Axian Software Consulting and Training

Win32 API Programming


Call 644-6106, ext. 107



for course registration or more information




Win32 Application Programming is designed to give an in-depth, low-level look at developing and debugging applications written for the Win32 programming interface.  The intent is to understand the underlying philosophy and methods of direct API programming so that programmers can not only use system functions, but be more adept at using higher level tools such as a C++ class library or an application generator.
Upon completion of the course, students should be able to
  • Develop basic Windows applications from scratch using direct API calls in the C programming language.
  • Register window classes and create windows.
  • Handle Windows messages, both queued and non-queued.
  • Be familiar with a variety of basic API calls to:
    1. Display a broad range of graphics, including drawings, metafiles, and regions.
    2. Manipulate logical mappings of coordinates.
    3. Add and interact with scroll bars.
    4. Create child windows and child window controls.
    5. Implement idle-time processing.
    6. Respond to keyboard and mouse messages.
    7. Create Menu and Dialog resources.
    8. Read and write to files
    9. Create and synchronized multiple-threaded applications
    10.   Implement basic Clipboard communication.
    11.   Develop dynamically linked libraries.

Course prerequisites

C programming language proficiency.


Course outline

Introduction To Windows Programming
A Program's Development Files
New Data Types & Hungarian Notation
A Windows Program
Program Entry Point
Registering the Window Class
Creating and Displaying the Window
The Message Loop
The Window Procedure
Processing Messages
Displaying Text
The WM_PAINT Message
Valid and Invalid Rectangles
Device Contexts
Text Metrics
System Metrics
Scroll Bars
Adding to a Window
Range and Position
Scroll Bar Messages
PAINTSTRUCT’s Invalid Rect
The Graphics Device Interface (GDI)
The Device Context
Getting the Handle
Getting Device Capabilities
Saving and Restoring Contexts
RGB Color
Stock Pens
User-Created Pens
Selecting Objects
Drawing Lines
Background Colors, Modes, and ROP2’s
Bezier Splines
Drawing Graphics
Stock Brushes
User-Created Brushes
Drawing Filled Areas
Rectangles and Ellipses
Polygons and Polygon Filling Modes
Rectangles, Regions, and Clipping
GDI Mapping Modes
Device and Logical Coordinates
The Viewport and the Window
Text, Metric, English, Isotropic, and Anisotopic Modes
Programs That Run During Dead Time
In Memory
Storing in a Disk File
Enhanced Metafiles
Keyboard Input
Window Focus
Keystroke Messages
The wParam and lParam Parameters
Virtual Keycodes
Character Messages
Shift States
Sending Messages
Mouse Input
Client-Area Mouse Messages
Simultaneous Shift Keys
Emulating the Mouse with the Keyboard
Child Windows and Mouse Input
Child Windows & Hit Testing
Capturing The Mouse
Changing the Cursor's Shape
Child Window Controls
Parent-Child Communications
Push, Check, Radio, Group
Checking and Enabling
Changing Child Window Text
Static Controls
The Edit Class
Parent Notification Codes
Messages to Edit Controls
ListBox Controls
Parent Notification Codes
Messages to ListBox Controls
Up-Down Controls
Visual Editing
Compiling Resources
Menu Template
Referencing Menus
Menus and Messages
Processing Menu Options
Enabling and Checking Menu Items
Dialog Boxes
Dialog Box Template,
Styles, Options, and Descriptions
Dialog Box Procedure
Invoking Modal Dialog Boxes
Dialog Box Functions
Message Boxes
Common Dialog Boxes
GetOpenFileName(), GetSaveFileName(), FindText(), ReplaceText(), ChooseColor(), ChooseFont()
Creating Multiple Threads
Windows’ Functions
C Run-time Library Functions
Suspending Thread Execution
Sleep( )
Setting Thread Priorities
Synchronization of Threads
Critical Sections
WaitForSingleObject( )
Global Memory Functions
Inter-Process Communication - The Clipboard
Standard Formats
Transferring Text, Bitmaps and Metafiles
Multiple Data-type Items
Delayed Rendering
Private Data Formats
Memory Mapped Files
Dynamic Link Libraries
Building DLL's
DLL Entry and Exit Points
Import Libraries
Manual Loading at Run-time
Resource-Only Libraries