The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,865 other followers

Trying to recover from enhancement software that generates fake input incorrectly – The Old New Thing

Posted by jpluimers on 2017/02/08

Be sure to read the details in Trying to recover from enhancement software that generates fake input incorrectly – The Old New Thing [WayBack] (much more Old New Think stuff below):

The most insightful part for me was this diagram listing where various methods enter the message pipeline (I added the GetMessage/PeekMessage entry):

GetMessage/PeekMessage obtains messages here
Inbound sent messages
SendMessage inserts messages here
Inbound posted messages
PostMessage inserts messages here
Inbound input messages
SendInput inserts messages here

The diagram is of course still inaccurate, but gives a good impression on how much lower priority user input has over posted or sent messages.

Similar diagrams for the message loop are from [WayBack] Lesson 4: The Real-Time Message Loop:


A very high level overview is at [WayBack] Message loop in Microsoft Windows – Wikipedia.


Related Old New Thing posts that were returned by searching for message loop:


A truckload of “message loop” related posts on Old New Thing already gives the right impression: message handling is tough.

Not all related posts focus on the message loop: many have it as a side topic from for instance handling various messages, or performing async processing. As many application stacks (like ATL, MFC, VCL, WinForms, OWL and such) use the message processing to support asynchronous tasks.

Some focus on initialisation and termination of processes and threads, owner and parent-ship of Windows and their life time management, as all those are very much related on how and when to handle messages.

Others are only referenced from message loop posts, but still are important as they provide guidance to good software development and design practices.

Three key things on the Old New Thing posts:

  • Most of them are centered around the Windows API. This focuses on the essentials (making them easier to follow), but also can make it harder as application stacks often encapsulate the Windows API, forcing you to learn how they do that and which parts can help you get your fingers behind they Windows API access.
  • They usually refer to related Old New Thing posts, which makes it a easier (less hard) to figure out Windows API related challenges.
  • The examples are usually centered around a sample application that started out in 2003 as a plain C example, but in 2005 got implemented as C++ example. Source for the latter is at [WayBack] functional/win32-scratch-program.cpp at master · okertanov/functional · GitHub.
    The posts with these examples are bolded in the list.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: