Skip to content

Latest commit

 

History

History
76 lines (66 loc) · 1.74 KB

File metadata and controls

76 lines (66 loc) · 1.74 KB
title CommandHandler
ms.custom na
ms.date 10/14/2016
ms.prod visual-studio-dev14
ms.reviewer na
ms.suite na
ms.technology
devlang-cpp
ms.tgt_pltfrm na
ms.topic article
f1_keywords
CommandHandler
dev_langs
C++
helpviewer_keywords
CommandHandler function
ms.assetid 662bc7bf-4a10-42b3-986d-d8bae4f63551
caps.latest.revision 11
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

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