This is a mirror of official site: http://jasper-net.blogspot.com/

Understanding message queue and the different types of Win32 messages

| Thursday, June 3, 2010
In this article, I will explain all about Win32 messages.

Terminology

System - Operating System
Applications - Microsoft Word or any other application

Contents

Windows Messages
Message Types
System-Defined Messages
Application-Defined Messages
Message Routing
Queued Messages
Non-queued Messages
Message Handling
Message Loop
Window Procedure
Posting and Sending Messages
Posting Messages
Sending Messages
Message Deadlocks
Broadcasting Messages
Windows Messages

The system passes all input (from input devices) to the various windows in an application. Each window has a function called a window procedure; the system calls this function whenever it has input. The window procedure function processes the input and returns control to the system. The system passes input to the window procedure function in the form of messages.

Messages are generated by both system and applications. The system generates a message at each input event - e.g., when the user types, moves the mouse, or clicks a control. An application can generate messages - e.g. when a dialog control (sel_change of Edit ctrl) creates a message and notifies its own window (dialog).

The system sends a message to a window procedure function with a set of four parameters: a window handle, a message identifier, and two values called message parameters. The values of the message parameters depend on the message.

Read more: Codeproject

Posted via email from jasper22's posterous

0 comments: