ISimpleFrameSite::PreMessageFilter  22US4VM

Provides a site with the opportunity to process a message that is received by a control s own window before the control itself does any processing.

HRESULT PreMessageFilter(

    HWND hWnd ,

//Handle of window receiving message

    UINT msg ,

//Received message

    WPARAM wp ,

//WPARAM of message

    LPARAM lp ,

//LPARAM of message

    LRESULT* plResult ,

//Pointer to variable to receive result of message processing

    DWORD* pdwCookie

//Pointer to a variable used later

   );

 

 

Parameters

hWnd

[in] Handle of the control window receiving the message.

msg

[in] Message received by the simple frame site.

wp

[in] The WPARAM of the message.

lp

[in] The LPARAM of the message.

plResult

[out] Pointer to the address of the result variable to receive the result of the message processing.

pdwCookie

[out] Pointer to the DWORD variable that will be passed to PostMessageFilter if it is called later. This parameter should only contain allocated data if this method returns S_OK so it will also receive a call to PostMessageFilter which can free the allocation. The caller is not in any way responsible for anything returned in this parameter.

 

Return Values

S_OK

The simple frame site will not use the message in this filter so more processing can take place.

S_FALSE

The site has processed the message and no further processing should occur.

E_NOTIMPL

The site does not do any message filtering, indicating that PostMessageFilter need not be called later.

E_POINTER

The addresses in plResultor pdwCookie are not valid.

 

Remarks

Successful return values indicate whether the site wishes to allow further processing. S_OK indicates further processing, whereas S_FALSE means do not process further. S_OK also indicates that the control must later call ISimpleFrameSite::PostMessageFilter.

See Also

ISimpleFrameSite::PostMessageFilter