共用方式為


CMFCColorBar::OnUpdateCmdUI

Called by the framework to enable or disable a user-interface item of a color bar control before the item is displayed.

virtual void OnUpdateCmdUI(
   CFrameWnd* pTarget,
   BOOL bDisableIfNoHndler 
);

Parameters

  • [in] pTarget
    Pointer to a window that contains a user-interface item to update.

  • [in] bDisableIfNoHndler
    TRUE to disable the user-interface item if no handler is defined in a message map; otherwise, FALSE.

Remarks

When a user of your application clicks a user-interface item, the item must know whether it should be displayed as enabled or disabled. The target of the command message provides this information by implementing an ON_UPDATE_COMMAND_UI command handler. Use this method to help process the command. For more information, see CCmdUI Class.

Requirements

Header: afxcolorbar.h

See Also

Reference

CMFCColorBar Class

Hierarchy Chart

CCmdUI Class