The Windows Function Calls

HELLOWIN makes calls to no less than 16 Windows functions. In the order they occur in HELLOWIN, these functions (with a brief description) are:

LoadIcon—Loads an icon for use by a program

LoadCursor—Loads a cursor for use by a program

GetStockObject—Obtains a graphics object (in this case a brush used for painting the window's background)

RegisterClass—Registers a window class for the program's window

CreateWindow—Creates a window based on a window class

ShowWindow—Displays the window on the screen

UpdateWindow—Directs the window to paint itself

GetMessage—Obtains a message from the message queue

TranslateMessage—Translates some keyboard messages

DispatchMessage—Sends a message to a window procedure

BeginPaint—Initiates the beginning of window painting

GetClientRect—Obtains the dimensions of the window's client area

DrawText—Displays a text string

EndPaint—Ends window painting

PostQuitMessage—Inserts a ”quit“ message into the message queue

DefWindowProc—Performs default processing of messages

These functions are documented in the Windows Programmer's Reference and declared in WINDOWS.H. I'll discuss each of them as we encounter them while dissecting the program.