Reflected Window Message IDs
A quick way to create an ActiveX control, or other specialized control, is to subclass a window. For more information, see MFC ActiveX Controls: Subclassing a Windows Control.
To prevent the control's container from receiving the window messages sent by a subclassed Windows control, COleControl creates a "reflector" window to intercept certain window messages and send them back to the control. The control, in its window procedure, can then process these reflected messages by taking actions appropriate for an ActiveX control.
The following table shows the messages that are intercepted and the corresponding messages that the reflector window sends.
Message sent by the control |
Message reflected to the control |
---|---|
OCM_COMMAND |
|
OCM_CTLCOLORBTN |
|
OCM_CTLCOLOREDIT |
|
OCM_CTLCOLORDLG |
|
OCM_CTLCOLORLISTBOX |
|
OCM_CTLCOLORSCROLLBAR |
|
OCM_CTLCOLORSTATIC |
|
OCM_DRAWITEM |
|
OCM_MEASUREITEM |
|
OCM_DELETEITEM |
|
OCM_VKEYTOITEM |
|
OCM_CHARTOITEM |
|
OCM_COMPAREITEM |
|
OCM_HSCROLL |
|
OCM_VSCROLL |
|
OCM_PARENTNOTIFY |
|
OCM_NOTIFY |
Notes
If the control runs on a Win32 system, there are several types of WM_CTLCOLOR* messages it may receive. For more information, see WM_CTLCOLORBTN, WM_CTLCOLORDLG, WM_CTLCOLOREDIT, WM_CTLCOLORLISTBOX, WM_CTLCOLORMSGBOX, WM_CTLCOLORSCROLLBAR, WM_CTLCOLORSTATIC.