Click here to Skip to main content
15,920,217 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Process Priority Pin
Hamid_RT6-Jul-07 0:52
Hamid_RT6-Jul-07 0:52 
QuestionPassing Handles Pin
tom groezer4-Jul-07 10:13
tom groezer4-Jul-07 10:13 
AnswerRe: Passing Handles Pin
David Crow5-Jul-07 3:07
David Crow5-Jul-07 3:07 
QuestionGeneral DLL questions Pin
ForNow4-Jul-07 9:52
ForNow4-Jul-07 9:52 
QuestionMultiple inheritance in MFC Pin
tom groezer4-Jul-07 9:28
tom groezer4-Jul-07 9:28 
AnswerRe: Multiple inheritance in MFC Pin
Mark Salsbery4-Jul-07 9:31
Mark Salsbery4-Jul-07 9:31 
GeneralRe: Multiple inheritance in MFC Pin
tom groezer4-Jul-07 10:19
tom groezer4-Jul-07 10:19 
GeneralRe: Multiple inheritance in MFC Pin
David Crow5-Jul-07 3:13
David Crow5-Jul-07 3:13 
tom groezer wrote:
When I need to derive a class from two classes whose base class is CWnd. Why this scenario is going to fail?


This paragraph sums it up quite nicely:

The CObject::IsKindOf member function will not correctly determine the type of an object if it has multiple base classes. Therefore, you cannot use CObject as a virtual base class, and all calls to CObject member functions such as Serialize and operator new will need to have scope qualifiers so that C++ can disambiguate the appropriate function call. If you do find the need to use MI within MFC, then you should be sure to make the class containing the CObject base class the left-most class in the list of base classes.

By deriving from two CWnd classes, references to CObject member functions will be ambiguous, and will need to be dealt with explicitly.


"A good athlete is the result of a good and worthy opponent." - David Crow

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


GeneralRe: Multiple inheritance in MFC Pin
Mark Salsbery5-Jul-07 10:54
Mark Salsbery5-Jul-07 10:54 
Questionhow to use "OnNewDocument" from cview or cmainframe class Pin
chaitannya_m4-Jul-07 9:18
chaitannya_m4-Jul-07 9:18 
AnswerRe: how to use "OnNewDocument" from cview or cmainframe class Pin
Mark Salsbery4-Jul-07 9:47
Mark Salsbery4-Jul-07 9:47 
GeneralRe: how to use "OnNewDocument" from cview or cmainframe class Pin
chaitannya_m4-Jul-07 16:21
chaitannya_m4-Jul-07 16:21 
GeneralRe: how to use "OnNewDocument" from cview or cmainframe class Pin
Mark Salsbery5-Jul-07 6:53
Mark Salsbery5-Jul-07 6:53 
QuestionC++ data structures Pin
tom groezer4-Jul-07 8:54
tom groezer4-Jul-07 8:54 
AnswerRe: C++ data structures Pin
Maximilien4-Jul-07 9:06
Maximilien4-Jul-07 9:06 
QuestionRe: C++ data structures Pin
David Crow5-Jul-07 3:15
David Crow5-Jul-07 3:15 
QuestionCString::Replace Problem [modified] Pin
lparsonson4-Jul-07 5:58
lparsonson4-Jul-07 5:58 
AnswerRe: CString::Replace Problem Pin
Mark Salsbery4-Jul-07 7:02
Mark Salsbery4-Jul-07 7:02 
GeneralRe: CString::Replace Problem Pin
lparsonson5-Jul-07 4:54
lparsonson5-Jul-07 4:54 
QuestionCStatic drawing interrupted... Worker, UI Threads???? Pin
Greg Ellis4-Jul-07 5:41
Greg Ellis4-Jul-07 5:41 
AnswerRe: CStatic drawing interrupted... Worker, UI Threads???? Pin
Matthew Faithfull4-Jul-07 6:27
Matthew Faithfull4-Jul-07 6:27 
GeneralRe: CStatic drawing interrupted... Worker, UI Threads???? Pin
Greg Ellis4-Jul-07 6:35
Greg Ellis4-Jul-07 6:35 
GeneralRe: CStatic drawing interrupted... Worker, UI Threads???? Pin
Matthew Faithfull4-Jul-07 6:55
Matthew Faithfull4-Jul-07 6:55 
AnswerRe: CStatic drawing interrupted... Worker, UI Threads???? [modified] Pin
Mark Salsbery4-Jul-07 7:08
Mark Salsbery4-Jul-07 7:08 
QuestionOnSize Assertion Error Pin
sdancer754-Jul-07 5:11
sdancer754-Jul-07 5:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.