Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: where's main() ??? Pin
Ravi Bhavnani16-Nov-03 14:22
professionalRavi Bhavnani16-Nov-03 14:22 
GeneralRe: where's main() ??? Pin
Dave Sweetser16-Nov-03 14:34
Dave Sweetser16-Nov-03 14:34 
GeneralRe: where's main() ??? Pin
Ravi Bhavnani16-Nov-03 15:00
professionalRavi Bhavnani16-Nov-03 15:00 
GeneralRe: where's main() ??? Pin
Dave Sweetser16-Nov-03 15:22
Dave Sweetser16-Nov-03 15:22 
GeneralRe: where's main() ??? Pin
Ravi Bhavnani16-Nov-03 15:37
professionalRavi Bhavnani16-Nov-03 15:37 
GeneralRe: where's main() ??? Pin
Dave Sweetser16-Nov-03 15:57
Dave Sweetser16-Nov-03 15:57 
GeneralRe: where's main() ??? Pin
Johnny ²16-Nov-03 21:43
Johnny ²16-Nov-03 21:43 
GeneralRe: where's main() ??? Pin
Ravi Bhavnani17-Nov-03 3:43
professionalRavi Bhavnani17-Nov-03 3:43 
Johnny is exactly right.

Windows (like any event driven GUI) requires your application to respond to events. Windows notifies your application when an event occurs by sending messages to its windows. Each message is identified by a WM_something constant. Examples of messages are:

  • WM_SIZE the user has just resized the dialog
  • WM_MOVE the user has moved the dialog
  • WM_QUERYENDSESSION Windows is shutting down and would like to terminate your application
  • WM_PAINT the user has moved a window, causing (part of) your window to need to be redrawn
MFC conveniently provides predefined methods (that you can override) to customize your response to these messages. The one you probably want to handle is the last one. The handler for this message is OnPaint().

My gut tells me you might be better off doing some reading before venturing into building your app. Once you get a better handle (pun intended) on MFC, you can decide where to inject your application's drawing code and perhaps add more bells and whistles to your app.

Good luck!

/ravi

Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com

GeneralI need some help please Pin
Anonymous16-Nov-03 13:18
Anonymous16-Nov-03 13:18 
GeneralRe: I need some help please Pin
Christian Graus16-Nov-03 16:16
protectorChristian Graus16-Nov-03 16:16 
GeneralGetting the system date Pin
kerplatz16-Nov-03 11:56
kerplatz16-Nov-03 11:56 
GeneralRe: Getting the system date Pin
Michael Dunn16-Nov-03 12:38
sitebuilderMichael Dunn16-Nov-03 12:38 
GeneralRe: Getting the system date Pin
kerplatz16-Nov-03 13:10
kerplatz16-Nov-03 13:10 
GeneralRe: Getting the system date Pin
Steve S17-Nov-03 2:05
Steve S17-Nov-03 2:05 
QuestionHow to move a CToolBar? Pin
Florin Ochiana16-Nov-03 11:32
Florin Ochiana16-Nov-03 11:32 
QuestionHow to show (restore) my window when MessageBox dialog is not closed? Pin
julych16-Nov-03 10:38
julych16-Nov-03 10:38 
AnswerRe: How to show (restore) my window when MessageBox dialog is not closed? Pin
Uma Mahes16-Nov-03 17:39
Uma Mahes16-Nov-03 17:39 
GeneralToggle views :: In_SplitterWnd Pin
gaesabal16-Nov-03 8:23
gaesabal16-Nov-03 8:23 
GeneralRe: Toggle views :: In_SplitterWnd Pin
Ivor S. Sargoytchev16-Nov-03 16:43
Ivor S. Sargoytchev16-Nov-03 16:43 
GeneralRestricting programs to parts of the screen Pin
Anonymous16-Nov-03 4:59
Anonymous16-Nov-03 4:59 
GeneralRe: Restricting programs to parts of the screen Pin
Michael Dunn16-Nov-03 5:23
sitebuilderMichael Dunn16-Nov-03 5:23 
Generalhelp wanted, pdf file split operation Pin
NotProfessional15-Nov-03 20:19
NotProfessional15-Nov-03 20:19 
GeneralHelp me: need strategy for CrashLogs Pin
Peter Weyzen15-Nov-03 18:22
Peter Weyzen15-Nov-03 18:22 
GeneralRe: Help me: need strategy for CrashLogs Pin
Michael P Butler16-Nov-03 1:48
Michael P Butler16-Nov-03 1:48 
GeneralRe: Help me: need strategy for CrashLogs Pin
Peter Molnar16-Nov-03 2:34
Peter Molnar16-Nov-03 2: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.