Dispatches a message from a container to a windowless object that is in-place active.
HRESULT OnWindowMessage(
UINT msg, //Message Identifier as provided by Windows
WPARAM wParam, //Message parameter as provided by Windows
LPARAM lParam, //Message parameter as provided by Windows
LRESULT* plResult //Pointer to message result code
);
A container calls this method to send window messages to a windowless object that is in-place active. The container should dispatch messages according to the following guidelines:
WM_MOUSEMOVE | |
WM_SETCURSOR | |
WM_XBUTTONDOWN | |
WM_XBUTTONUP | |
WM_XBUTTONDBLCLK |
WM_KEYDOWN | WM_SYSKEYUP |
WM_KEYUP | WM_SYSDEADCHAR |
WM_CHAR | WM_IMExxx |
WM_DEADCHAR | WM_HELP |
WM_SYSKEYDOWN | WM_CANCELMODE |
The windowless object can return S_FALSE to this method to indicate that it did not process the message. Then, the container either performs the default behavior for the message by calling the Windows API function DefWindowProc, or processes the message itself.
The container must pass the following window messages to the default window procedure:
WM_MOUSEMOVE | WM_DEADCHAR |
WM_XBUTTONxxx | WM_SYSKEYUP |
WM_KEYDOWN | WM_SYSCHAR |
WM_KEYUP | WM_SYSDEADCHAR |
WM_CHAR | WM_IMExxx |
The container must process the following window messages as its own:
WM_SETCURSOR | |
WM_CONTEXTMENU | |
WM_HELP |
Note For WM_SETCURSOR, the container can either set the cursor itself or do nothing.
Objects can also use IOleInPlaceSiteWindowless::OnDefWindowMessage to explicitly invoke the default message processing from the container. In the case of the WM_SETCURSOR message, this allows an object to take action if the container does not set the cursor.
All coordinates passed to the object in wParam and lParam are specified as client coordinates of the containing window.
Windows NT: Use version 4.0 or later. New for OC96.
Windows: Use Windows 95 or later. New for OC96.
Windows CE: Unsupported.
Header: Declared in ocidl.h.
IOleInPlaceSiteWindowless::SetCapture, IOleInPlaceSiteWindowless::OnDefWindowMessage