CCmdUI::Enable

virtual void Enable( BOOL bOn = TRUE );

Parameters

bOn

TRUE to enable the item, FALSE to disable it.

Remarks

Call this member function to enable or disable the user-interface item for this command.

Example

BEGIN_MESSAGE_MAP(CFileDoc, CDocument)
    // Many ON_* macros removed...
    ON_UPDATE_COMMAND_UI(ID_FILE_SAVE, OnUpdateFileSave)
END_MESSAGE_MAP()
.
.
.
void CFileDoc::OnUpdateFileSave(CCmdUI* pCmdUI) 
{
    // Enable the menu item if the file has been modified.
    pCmdUI->Enable(m_fModified);
}

CCmdUI OverviewClass MembersHierarchy Chart

See Also   CCmdUI::SetCheck