INFO: WM_ACTIVATEAPP Has lParam of Zero (0)

ID: Q135785

The information in this article applies to:

SUMMARY

Although the current Win32 documentation does not specifically indicate this, it is possible (and very likely) that the WM_ACTIVATEAPP message will be received by an application with the lParam equal to 0. You can in fact get 0 in lParam when activating and deactivating.

MORE INFORMATION

In previous versions of Windows, activation and deactivation used to be synchronous. This meant that you could never switch away from an application that was locked up because the application becoming active had to wait for a synchronous reply from the application being deactivated. The activating application would get stuck waiting for the deactivating application to process and return from the WM_ACTIVATEAPP, WM_ACTIVATE, and WM_NCACTIVATE messages.

In Windows 95 and Windows NT, Microsoft removed every place where these types of synchronous lockups can occur. When asynchronous activation occurs, the activating application becomes active immediately, and the messages to the deactivating application occur later. This means two things:

Additional query words:
Keywords          : kbNTOS kbGrpUser kbWinOS95 kbWinOS98 kbWndw kbWndwMsg 
Issue type        : kbinfo

Last Reviewed: January 2, 1999