Professional Documents
Culture Documents
The Microsoft Foundation Class Library Application Framework
The Microsoft Foundation Class Library Application Framework
Application framework
“An integrated collection of object-oriented software
components that offers all that's needed for a generic application.“
CMyFrame::CMyFrame()
{
Create(NULL, "MYAPP Application");
}
void CMyFrame::OnLButtonDown(UINT nFlags, CPoint point)
{ TRACE("Entering CMyFrame::OnLButtonDown - %lx, %d, %d\n", (long) nFlags, point.x,
point.y);
}
void CMyFrame::OnPaint()
{ CPaintDC dc(this);
dc.TextOut(0, 0, "Hello, world!");
}
Application startup
When the user starts the application, Windows calls the application framework's built-in
WinMain function, and WinMain looks for your globally constructed application object of a class
derived from CWinApp.
In a C++ program global objects are constructed before the main program is executed.