Monday, 4 March 2013

Organising your first project


Organising your first project

The first step is to use Microsoft Foundation classes to create a Visual C++ program. There
are four basic parts in a Visual C++ program.
·  The application object (xxWelcome.h and xxWelcome.cpp) is what Windows actually
runs first by calling the WinMain() method to get the program started. This object has
three tasks: starting the program, placing the main window on the screen and passing
Windows messages from the operating system to the main window. These messages
include WM_QUIT if the user quits, WM_SIZE if the user resizes the window,
WM_SETFONT and many others.
·  The main window object (MainFrm.h and MainFrm.cpp) is responsible for the title bar,
menu bar, toolbar and status bar.
·  The view object (xxWelcomeView.h and xxWelcomeView.cpp) displays data in the
client area of the window. The OnDraw() method in the WelcomeView.cpp file allows us
to display messages and other objects on the screen.
·  The document object (xxWelcomeDoc.h and xxWelcomeDoc.cpp) is where the
program’s data is stored.
These four objects communicate as the program runs.

No comments:

Post a Comment