ICommandTarget 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

ICommandTarget Interface 

Provides a user control with an interface to receive commands from a command source object.

interface class ICommandTarget

When you host a user control in an MFC View, CWinFormsView routes commands and update command UI messages to the user control to allow it to handle MFC commands (for example, frame menu items and toolbar buttons). By implementing ICommandTarget, you give the user control a reference to the ICommandSource object.

See How to: Add Command Routing to the Windows Forms Control for an example of how to use ICommandTarget.

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

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

© 2015 Microsoft