ICommandUI Interface
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

ICommandUI Interface

Manages user interface commands.

interface class ICommandUI

This interface provides methods and properties that manage user interface commands. ICommandUI is similar to CCmdUI Class, except that ICommandUI is used for MFC applications that interoperate with .NET components.

ICommandUI is used within an ON_UPDATE_COMMAND_UI handler in an ICommandTarget-derived class. When a user of an application activates (selects or clicks) a menu, each menu item is displayed as enabled or disabled. The target of each menu command provides this information by implementing an ON_UPDATE_COMMAND_UI handler. For each of the command user interface objects in your application, use the Properties window to create a message-map entry and function prototype for each handler.

For more information on how the ICommandUI interface is used in command routing, see How to: Add Command Routing to the Windows Forms Control.

For more information on using Windows Forms, see Using a Windows Forms User Control in MFC.

For more information on how user interface commands are managed in MFC, see CCmdUI Class.

Header: afxwinforms.h (defined in assembly atlmfc\lib\mfcmifc80.dll)

© 2015 Microsoft