Click here to Skip to main content
14,666,906 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to save print view to pdf? Pin
Le@rner28-Jan-16 0:25
MemberLe@rner28-Jan-16 0:25 
GeneralRe: how to save print view to pdf? Pin
Richard MacCutchan28-Jan-16 1:12
mveRichard MacCutchan28-Jan-16 1:12 
QuestionWhat should constructor do? Pin
Vaclav_27-Jan-16 3:07
MemberVaclav_27-Jan-16 3:07 
AnswerRe: What should constructor do? Pin
Jochen Arndt27-Jan-16 4:10
professionalJochen Arndt27-Jan-16 4:10 
AnswerRe: What should constructor do? Pin
jschell27-Jan-16 9:06
Memberjschell27-Jan-16 9:06 
GeneralRe: What should constructor do? Pin
Vaclav_27-Jan-16 16:46
MemberVaclav_27-Jan-16 16:46 
AnswerRe: What should constructor do? Pin
CPallini27-Jan-16 21:40
mveCPallini27-Jan-16 21:40 
AnswerRe: What should constructor do? Pin
Albert Holguin28-Jan-16 5:26
professionalAlbert Holguin28-Jan-16 5:26 
If it clears things up at all....

If you ever write some C++ code using MFC (Microsoft's Foundation Class, essentially an OO wrapper around the WinAPI), you'll notice that there are always initialization routines aside from constructors (they're called OnInit...blah ).

If you happen to use a dialog object, and attempt to draw from the constructor instead of the initialization routine, you'll notice that the objects exist but are not windows yet so you'll get an assertion (if running in debug mode). This means that the constructors have been called but nothing has been drawn yet. The drawing only occurs after all the constructors have been called, the initialization routines are systematically called after that and you can load all the widgets with whatever the default values to be displayed are.

Moral of the story, drawing typically doesn't take place during construction of objects.
QuestionEnable/Disable Ribbon Menu Item Dynamically Pin
rajmohan 12326-Jan-16 23:13
Memberrajmohan 12326-Jan-16 23:13 
AnswerRe: Enable/Disable Ribbon Menu Item Dynamically Pin
Jochen Arndt27-Jan-16 1:49
professionalJochen Arndt27-Jan-16 1:49 
GeneralRe: Enable/Disable Ribbon Menu Item Dynamically Pin
rajmohan 12327-Jan-16 21:14
Memberrajmohan 12327-Jan-16 21:14 
GeneralRe: Enable/Disable Ribbon Menu Item Dynamically Pin
Jochen Arndt27-Jan-16 21:35
professionalJochen Arndt27-Jan-16 21:35 
QuestionInterview Test Question Pin
Richard Andrew x6426-Jan-16 13:18
professionalRichard Andrew x6426-Jan-16 13:18 
AnswerRe: Interview Test Question Pin
David Crow27-Jan-16 4:22
MemberDavid Crow27-Jan-16 4:22 
AnswerRe: Interview Test Question Pin
Albert Holguin28-Jan-16 5:13
professionalAlbert Holguin28-Jan-16 5:13 
QuestionWin32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris26-Jan-16 12:49
MemberFrederick J. Harris26-Jan-16 12:49 
AnswerRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris26-Jan-16 13:30
MemberFrederick J. Harris26-Jan-16 13:30 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris26-Jan-16 17:18
MemberFrederick J. Harris26-Jan-16 17:18 
AnswerRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt26-Jan-16 21:47
professionalJochen Arndt26-Jan-16 21:47 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris27-Jan-16 10:01
MemberFrederick J. Harris27-Jan-16 10:01 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt27-Jan-16 21:26
professionalJochen Arndt27-Jan-16 21:26 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris28-Jan-16 4:22
MemberFrederick J. Harris28-Jan-16 4:22 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt28-Jan-16 4:45
professionalJochen Arndt28-Jan-16 4:45 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris29-Jan-16 5:10
MemberFrederick J. Harris29-Jan-16 5:10 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt29-Jan-16 5:34
professionalJochen Arndt29-Jan-16 5:34 

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.