Delen via


CCommandManager Class

The CCommandManager class manages commands and their association with images.

class CCommandManager

Members

Public Methods

Name

Description

CCommandManager::CleanUp

Deletes all elements from the command list and from the global and user maps.

CCommandManager::ClearAllCmdImages

Deletes all elements from the command list and from the global and user maps.

CCommandManager::ClearCmdImage

Deletes from the user map an element that has a specified command ID.

CCommandManager::ClearUserCmdImages

Deletes all elements from the user map.

CCommandManager::EnableMenuItemImage

Determines whether the command ID is associated with an image.

CCommandManager::GetCmdImage

Returns the index of an image that is associated with a specified command ID.

CCommandManager::GetMenuUserImage

Returns the image index associated with a menu item that has a specified command ID.

CCommandManager::IsMenuItemWithoutImage

Indicates whether the command ID is associated with an image index.

CCommandManager::LoadState

Loads all user command values from the registry.

CCommandManager::ResetAllImages

Reserved for future use.

CCommandManager::SaveState

Saves all user command values to the registry.

CCommandManager::SetCmdImage

Creates a new association between a command ID and an image index.

Remarks

This class supports the MFC framework infrastructure and is not intended to be used directly from your code.

Menu and toolbar classes in Visual C++ 2008 Feature Pack use a single global static CCommandManager object to support the user interface by managing command IDs and their associated image indexes.

Inheritance Hierarchy

CCommandManager

Requirements

Header: afxcommandmanager.h

See Also

Concepts

MFC Hierarchy Chart

Other Resources

Classes (MFC Feature Pack)

Change History

Date

History

Reason

April 2009

Removed the unused placeholder for CCommandManager::SetUserImages.

Information enhancement.