Disable/Enable Ribbon Buttons for MFC Feature Pack
问题 I am using the MFC Feature Pack and I have some buttons on a ribbon bar, instances of CMFCRibbonButton. The problem is that I would like to enable and disable some of them in certain conditions, but at runtime. How can I do this? because there is no specific method for this...I heard that a solution would be to attach/detach the event handlers at runtime, but I do not know how... 回答1: When you create the CMFCRibbonButton object you have to specify the associated command ID (see the