IMenuBand::TranslateMenuMessage method (shobjidl_core.h)

Translates a message for a Component Object Model (COM) object.

Syntax

HRESULT TranslateMenuMessage(
  [in, out] MSG     *pmsg,
  [out]     LRESULT *plRet
);

Parameters

[in, out] pmsg

Type: MSG*

A pointer to an MSG structure that contains the incoming message.

[out] plRet

Type: LRESULT*

A pointer to the translated message.

Return value

Type: HRESULT

This method can return one of these values.

Return code Description
S_OK
The message was handled and should be deleted.
S_FALSE
The message was not handled. In this case, *plRet is NULL.

Remarks

Typically, IMenuBand::IsMenuMessage is called before this method. The parent window proc, not the message pump, must call IMenuBand::TranslateMenuMessage for every message.

This method can change the values of pmsg. If so, the changes should be forwarded on.

This method is required because some modal message pumps do not allow a call to a custom translation method.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shell32.dll