this->GetMenu()->GetSubMenu(nSubMenuIndex)->EnableMenuItem(ID_SUB_MENU_ITEM, MF_GRAYED);
如果是要針對menu本身的Item,僅需用下列的作法:
this->GetMenu()->EnableMenuItem(1, MF_GRAYED|MF_BYPOSITION);
因為menu的item並沒有ID,所以在設定的時候要多給MF_BYPOSITION,這樣就可以用Index來指定Item了。
this->GetMenu()->GetSubMenu(nSubMenuIndex)->EnableMenuItem(ID_SUB_MENU_ITEM, MF_GRAYED);
this->GetMenu()->EnableMenuItem(1, MF_GRAYED|MF_BYPOSITION);
Build docker image from multiple build contexts ...
No comments:
Post a Comment