previous next

The Main Procedure of a PM Program

MAIN PROCEDURE - program entry point
INITIALIZATION
Define any local data
Initialize the PM API for use by the thread
Create a message input queue for this thread
Register classes and create top-level windows
Create and Associate help instance

MESSAGE PROCESSING
LOOP - message polling
When message in queue is WM_QUIT exit loop
Send the message off for processing
ENDLOOP - message polling

TERMINATION
Destroy help instance
Destroy the application top-level window
Destroy the message input queue for this thread
Terminate the application use of the PM API