Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

Dr Kuulun

@Dr Kuulun
About
Posts
13
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • return value of = operator
    D Dr Kuulun

    That's it! Thanx! Dr-Kuulun

    C / C++ / MFC question

  • return value of = operator
    D Dr Kuulun

    Hi, what is the reason for the Cxyz& return value with *this parameter of = operators? Dr-Kuulun

    C / C++ / MFC question

  • Deriving from CObject and using = operator
    D Dr Kuulun

    Yes it is wrong. Both objects should be instances from the last derrived class type CB. Dr-Kuulun

    C / C++ / MFC question

  • CLisrctrl
    D Dr Kuulun

    I can't find what is wrong. But you should place the while-statement at the beginning of the loop. Your loop will show wrong data or crashes if you open an empty file. Dr-Kuulun

    C / C++ / MFC help ios

  • = operator in CObject-derived classes
    D Dr Kuulun

    But the operator is represented by a function. Functions can be virtual. Why is it not possible for an operator? Now I wrote a virtual clone-function an the list class calls this function to copy the elements. This way works fine. Dr-Kuulun

    C / C++ / MFC question help

  • = operator in CObject-derived classes
    D Dr Kuulun

    Hello, I wrote one post this day to my problem. Now I am able to describe my problem more detailed. So once more: I want to write a base class and a class that manage a list of objects derived from my base class. The list-class should have a = operator that copies the whole list and creates copies of all its elements (derived from base class). The base class is derived from CObject because of serialisation and so on. It also includes some basic methods and members. class CBase::Cobject { .... } Now I derive some classes from it. class CA::CBase { } class CB::CBase { } All classes should have a = operator to copy its elements! The list-class now have a list of pointers to some instances from CA und CB in a CObArray. The = operator of the list-class shoud create a copy of the list an the members. CBase* pElement1; CBase* pElement2; CRuntimClass* pRTC; int nIndex; for (nIndex=0; nIndexGetCount(); nIndex++) { pElement1 = pList->GetAt(nIndex); pRTC = pElement1->GetRuntimeClass(); pElement2 = (CBase*)pRTC->CreateObject(); pRTC = pElement2->GetRuntimeClass(); *pElement2 = *pElement1; Add(pElement2); } pList is a pointer to the source CObArray-Object. Add() adds an element in the destination CObArray-Object. Now the problem: *pElement2 = *pElement1 do not call the = operator of CA or CB. The = operators have no virtual behaviour. The result ist that not all elements (CBase and CA/CB) are copied. Only the = operator of CBase is called. What is to do? And how can i call in the = operator function of CA the = operator funrction of CBase to copy the base elements? And one more question: What is the reason for the Cxyz& return type of the = operators and the return(*this) statement? Thanx Dr-Kuulun

    C / C++ / MFC question help

  • Deriving from CObject and using = operator
    D Dr Kuulun

    Hello, how is the = operator to be implemented in a class derived from CObject? I derived two classes with one element inside: class CA : CObject { int a; void operator = (const CA& src) {}; } class CB : CA { int b; } The first class overwrites the = operator with an empty function. The following code has a mystic result: CA obA; CB obB; obA.a=1; obA.b=2; obB=obA; The element b is copied, a not. Why? And what do the = operator in CObject? Why is b copied? Do I have to implement the operator in Class CB too? Many questions no answer! Thanx Markus Dr-Kuulun

    C / C++ / MFC question

  • Adobe Distiller
    D Dr Kuulun

    I forgot my code:

    CDC dc;
    dc.CreateCompatibleDC(pDC);
    CBitmap b;
    b.LoadBitmap(IDB\_BITMAP1);
    dc.SelectObject(&b);
    pDC->StretchBlt(100,100,200,200,&dc,0,0,48,48,SRCCOPY);
    pDC->MoveTo(0,0);
    pDC->LineTo(100,100);
    

    The line is visible but not the bitmap. Dr-Kuulun

    C / C++ / MFC graphics adobe help question

  • Adobe Distiller
    D Dr Kuulun

    Hi, I have a problem with the output of CBitmap images to Adobe Distiller. I can see my bitmap in the view and the preview. Printing is also fine. But the output into pdf does not work. Text and other graphics like lines or boxes works fine, only bitmaps are not visible. Is there anybody with a solution in the world? Greetings from Hannover, Germany Markus Dr-Kuulun

    C / C++ / MFC graphics adobe help question

  • Carray doubt
    D Dr Kuulun

    Hi, i had the same problem and it seems to be impossible. i created a lot of instances of my class with 'new' and than i stored the pointers in an CObList or CObArray. This array stores only the pointers, so clean the memory up ('delete pClass') when deleting the array. Dr-Kuulun

    C / C++ / MFC question data-structures

  • version and problem with mscomm32
    D Dr Kuulun

    hi, is the someone who knows the actual version of the mscomm32.ocx control? where can i search for a new release? i have problems with the parity option. after an undefined time of work the control sends only the parity replace char to my software. when i close and start the port again the problem is cleared until it occurs again. this problem happens mainly on laptops. i checked the correct bit stream with an oscilloscope. the bit stream is at any time correct. did you recognize the same problem? Dr-Kuulun

    C / C++ / MFC announcement help question

  • How to select the entire row in CListControl
    D Dr Kuulun

    hi, i think it is impossible. you can only select one or more cols. Dr-Kuulun

    C / C++ / MFC tutorial question

  • Serial Port
    D Dr Kuulun

    hi, use the activex control mscomm! this will solve all your problems. markus Dr-Kuulun

    C / C++ / MFC help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups