Page 16 - DCAP408_WEB_PROGRAMMING
P. 16
Windows Programming
Notes Self Assessment
Fill in the blanks:
8. To write programs that are precisely like the inventors of MFC or OWL figured out you
would, and you don’t care regarding the overhead, then using class libraries and
........................ is the method to go.
9. A ........................ function is called by Windows to process messages for the application.
1.6 The Structure of a Windows Program
For a negligible Windows program that just utilizes the Windows API, you will write two
functions. These are a WinMain() function, where execution of the program starts and basic
program initialization is performed, and a WindowProc() function that is called by Windows to
process messages for the application. The WindowProc() part of a Windows program is typically
the larger portion since this is where most of the application-specific code is, reacting to messages
caused by user input of one type or another.
Notes Even though these two functions make up an absolute program, they are not directly
associated. WinMain() does not call WindowProc(), Windows does. Actually, Windows
also calls WinMain().
10 LOVELY PROFESSIONAL UNIVERSITY