Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Tracks the usage count of Windows messages, such as when the user selects an item from a menu.
class CMFCCmdUsageCount : public CObject
Members
Public Constructors
Name |
Description |
CMFCCmdUsageCount::CMFCCmdUsageCount |
Default constructor. |
CMFCCmdUsageCount::~CMFCCmdUsageCount |
Destructor. |
Public Methods
Name |
Description |
Increments by one the counter that is associated with the given command. |
|
Retrieves the usage count that is associated with the given command ID. |
|
Determines whether this object has collected the minimum amount of tracking data. |
|
Determines whether the given command is frequently used. |
|
Clears the usage count of all commands. |
|
Reads this object from an archive or writes it to an archive. (Overrides CObject::Serialize.) |
|
Sets the values of shared CMFCCmdUsageCount class data members. |
Data Members
Name |
Description |
m_CmdUsage |
A CMap object that maps commands to their usage counts. |
m_nMinUsagePercentage |
The minimum usage percentage for a command to be frequently used. |
m_nStartCount |
The start counter that is used to determine whether this object has collected the minimum amount of tracking data. |
m_nTotalUsage |
The count of all tracked commands. |
Remarks
The CMFCCmdUsageCount class maps each numeric Windows message identifier to a 32-bit unsigned integer counter. CMFCToolBar uses this class to display frequently-used toolbar items. For more information about CMFCToolBar, see CMFCToolBar Class.
You can persist CMFCCmdUsageCount class data between runs of your program. Use the CMFCCmdUsageCount::Serialize method to serialize class member data and the CMFCCmdUsageCount::SetOptions method to set shared member data.
Inheritance Hierarchy
Requirements
Header: afxcmdusagecount.h