The CCmdUI Class
When it routes an update command to its handler, the framework passes the handler a pointer to a CCmdUI
object (or to an object of a CCmdUI
-derived class). This object represents the menu item or toolbar button or other user-interface object that generated the command. The update handler calls member functions of the CCmdUI
structure through the pointer to update the user-interface object. For example, here is an update handler for the Clear All menu item:
void CMyWinApp::OnUpdateEditClearAll(CCmdUI *pCmdUI)
{
pCmdUI->Enable(m_bClearAllAvailable);
}
This handler calls the Enable
member function of an object with access to the menu item. Enable
makes the item available for use.
See also
คำติชม
https://aka.ms/ContentUserFeedback
เร็วๆ นี้: ตลอดปี 2024 เราจะขจัดปัญหา GitHub เพื่อเป็นกลไกคำติชมสำหรับเนื้อหา และแทนที่ด้วยระบบคำติชมใหม่ สำหรับข้อมูลเพิ่มเติม ให้ดู:ส่งและดูข้อคิดเห็นสำหรับ