Click here to Skip to main content
15,889,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Microsoft 'C' Compiler 6.00 Pin
Steve S27-Aug-03 22:49
Steve S27-Aug-03 22:49 
GeneralRe: Microsoft 'C' Compiler 6.00 Pin
C. Augusto Proiete28-Aug-03 3:39
C. Augusto Proiete28-Aug-03 3:39 
Generalpass complex data type from CMyapp to CMyDoc (std MFC stuf) Pin
Member 53141427-Aug-03 12:54
Member 53141427-Aug-03 12:54 
GeneralRe: pass complex data type from CMyapp to CMyDoc (std MFC stuf) Pin
Ravi Bhavnani27-Aug-03 13:12
professionalRavi Bhavnani27-Aug-03 13:12 
GeneralRe: pass complex data type from CMyapp to CMyDoc (std MFC stuf) Pin
Antti Keskinen16-Feb-04 3:04
Antti Keskinen16-Feb-04 3:04 
GeneralAssertion error at CDialog dereived class constructor Pin
Vassilis Papoulidis27-Aug-03 12:47
Vassilis Papoulidis27-Aug-03 12:47 
GeneralRe: Assertion error at CDialog dereived class constructor Pin
valikac27-Aug-03 12:51
valikac27-Aug-03 12:51 
GeneralRe: Assertion error at CDialog dereived class constructor Pin
Dave Bryant27-Aug-03 12:57
Dave Bryant27-Aug-03 12:57 
The assertion is probably something like ASSERT( ::IsWindow( m_hWnd ) );

This happens because while in the constructor, your dialog is not actually a real window yet. The MFC classes, such as CDialog, are wrappers around the real windows which are represented by HWNDs. This means that there is two stage initialisation: firstly the CDialog (or equivalent) object must be created, and then secondly, the real window must be created, or the MFC object must be attached to an existing real window. The consequence of this is that within the object's constructor, you cannot call any methods or use any member variables that expect the dialog to be created as yet. The member variables for the edit boxes get attached to the real edit controls during the first call to DoDataExchange(), but this is not called until somewhere inside CDialog::OnInitDialog(). Until that has been called, your member variables are not yet attached to real windows, and so will assert if you try to call methods that assume otherwise.

Dave
http://www.cloudsofheaven.org
Generalkeybd_event question Pin
halblonious27-Aug-03 11:53
halblonious27-Aug-03 11:53 
QuestionWhat is a game engine?? Pin
Snyp27-Aug-03 10:09
Snyp27-Aug-03 10:09 
AnswerRe: What is a game engine?? Pin
Jim Crafton27-Aug-03 10:21
Jim Crafton27-Aug-03 10:21 
AnswerRe: What is a game engine?? Pin
Maximilien27-Aug-03 10:26
Maximilien27-Aug-03 10:26 
GeneralASSERT failure Pin
mr200327-Aug-03 9:13
mr200327-Aug-03 9:13 
GeneralRe: ASSERT failure Pin
David Crow27-Aug-03 9:53
David Crow27-Aug-03 9:53 
GeneralRe: ASSERT failure Pin
mr200327-Aug-03 10:11
mr200327-Aug-03 10:11 
GeneralRe: ASSERT failure Pin
David Crow27-Aug-03 10:19
David Crow27-Aug-03 10:19 
GeneralRe: ASSERT failure Pin
mr200327-Aug-03 16:17
mr200327-Aug-03 16:17 
GeneralRe: ASSERT failure Pin
David Crow28-Aug-03 2:11
David Crow28-Aug-03 2:11 
GeneralRe: ASSERT failure Pin
Alvaro Mendez27-Aug-03 10:00
Alvaro Mendez27-Aug-03 10:00 
GeneralRe: ASSERT failure Pin
WebmastaX27-Aug-03 11:29
WebmastaX27-Aug-03 11:29 
GeneralRe: ASSERT failure Pin
vcplusplus27-Aug-03 12:27
vcplusplus27-Aug-03 12:27 
GeneralActive Reports VC++ Implementation Guide Pin
Miguel Lopes27-Aug-03 8:57
Miguel Lopes27-Aug-03 8:57 
GeneralInsert -- OVR Pin
halblonious27-Aug-03 6:58
halblonious27-Aug-03 6:58 
GeneralRe: Insert -- OVR Pin
David Crow27-Aug-03 7:05
David Crow27-Aug-03 7:05 
GeneralRe: Insert -- OVR Pin
halblonious27-Aug-03 9:48
halblonious27-Aug-03 9:48 

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.