IOleInPlaceSiteWindowless::OnDefWindowMessage  XIV7N6

Invokes the default processing for all messages passed to an object.

HRESULT OnDefWindowMessage(

    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

   );

 

 

Parameters

msg

[in] Identifier for the window message provided to the container by Windows.

wParam

[in] Parameter for the window message provided to the container by Windows.

lParam

[in] Parameter for the window message provided to the container by Windows.

plResult

[out] Pointer to result code for the window message as defined in the Windows API.

 

Return Values

S_OK

The container s default processing for the window message was successfully invoked.

S_FALSE

The container s default processing for the window message was not invoked. See Note to Implementers below.

 

Remarks

A windowless object can explicitly invoke the default processing for a window message by calling this method. A container dispatches window messages to its windowless objects by calling IOleInPlaceObjectWindowless::OnWindowMessage. The object usually returns S_FALSE to indicate that it did not process the message. Then, the container can perform the default behavior for the message by calling the Windows API function DefWindowProc.

Instead, the object can call this method on the container s site object to explicitly invoke the default processing. Then, the object can take action on its own if the container does not handle the message.

Note to Implementers

The container must pass the following window messages to its default window procedure (the DefWindowProc Windows API function) and return S_OK. Note that *plResult should contain the value returned by DefWindowProc.

WM_MOUSEMOVE

WM_DEADCHAR

WM_XBUTTONxxx

WM_SYSKEYUP

WM_KEYDOWN

WM_SYSCHAR

WM_KEYUP

WM_SYSDEADCHAR

WM_CHAR

WM_IMExxx

 

The container can either process the window messages as its own and return S_OK or not do anything and return S_FALSE.

WM_SETCURSOR

 

WM_CONTEXTMENU

 

WM_HELP

 

 

If the container returns S_FALSE, the object can take action to process the window message on its own.

See Also

IOleInPlaceObjectWindowless::OnWindowMessage