Message Reflection and Forwarding
In many cases, Windows controls send messages to their parent windows: when a button is clicked, when a treeview item is expanded, or when a list-box item is selected, for example. These messages are usually the result of user action, and the parent window is often the best place to handle the user’s request.
Other messages are also sent to the parent window. These messages are sent not as the result of a user’s action, but as a way for the parent window to customize something about the control’s operation. The classic example is the WM_CTLCOLORXXX
set of messages, which are sent to the parent window to allow it to change the default colors when a control draws. Handling such messages is fairly easy. For example, ...
Get ATL Internals: Working with ATL 8, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.