PRB: Problems with SetSysColors on SMP SystemsID: Q198980
|
BETA INFORMATION BETA INFORMATION BETA INFORMATION |
This article discusses a Beta release of a Microsoft product. The
information in this article is provided as-is and is subject to change
without notice. |
BETA INFORMATION BETA INFORMATION BETA INFORMATION |
Because SetSysColors sends a WM_SYSCOLORCHANGING message to all top-level windows, which must propagate it to lower-level children, it's possible for a thread with one processor affinity to send a size, position, or show message to a thread with another processor affinity and have it arrive before or after the WM_SYSCOLORCHANGING message. This can cause the window to miss the WM_SYSCOLORCHANGING message.
This behavior is a consequence of the designed behavior of Windows NT on SMP systems. Applications that make global changes to the system should make no other changes until there has been sufficient time for the original set of changes to take effect.
Using SendMessageTimeOut() and BroadcastSystemMessage() to make sure that messages have propagated through the system has been shown to make the problem less severe, but does not completely prevent it.
This behavior is by design, because there is no guarantee of synchronicity or determinism in messages sent by different threads.
Applications that make global changes must ensure that such changes are synchronized.
Additional query words:
Keywords : kbNTOS400 kbWinOS2000 kbSDKWin32 kbSysSettings kbGrpUser kbWndwMsg
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: April 30, 1999