Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.25 KB

commandhandler.md

File metadata and controls

49 lines (35 loc) · 1.25 KB
description title ms.date ms.topic helpviewer_keywords ms.assetid
Learn more about: CommandHandler
CommandHandler
11/04/2016
reference
CommandHandler function
662bc7bf-4a10-42b3-986d-d8bae4f63551

CommandHandler

CommandHandler is the function identified by the third parameter of the COMMAND_HANDLER macro in your message map.

Syntax

LRESULT CommandHandler(
    WORD wNotifyCode,
    WORD wID,
    HWND hWndCtl,
    BOOL& bHandled);

Parameters

wNotifyCode
The notification code.

wID
The identifier of the menu item, control, or accelerator.

hWndCtl
A handle to a window control.

bHandled
The message map sets bHandled to TRUE before CommandHandler is called. If CommandHandler does not fully handle the message, it should set bHandled to FALSE to indicate the message needs further processing.

Return Value

The result of message processing. 0 if successful.

Remarks

For an example of using this message handler in a message map, see COMMAND_HANDLER.

See also

Implementing a Window
Message Maps
WM_NOTIFY