[英]Set check of CMFCRibbonCheckBox
The MFC CMFCRibbonCheckBox
class only supports IsChecked()
. MFC
CMFCRibbonCheckBox
类仅支持IsChecked()
。
How do I change check status of ribbon check box in program code? 如何在程序代码中更改功能区复选框的检查状态? Is there way to set check status like
CButton::SetCheck()
. 有没有办法设置检查状态,如
CButton::SetCheck()
。
you can copy code from CMFCRibbonCmdUI::SetCheck. 您可以从CMFCRibbonCmdUI :: SetCheck复制代码。 CMFCRibbonBaseElement::m_bIsPressed is a protected member so you need to expose it via a derived class.
CMFCRibbonBaseElement :: m_bIsPressed是受保护的成员,因此您需要通过派生类公开它。 CMFCRibbonCmdUI has a backdoor to it through class friendship.
CMFCRibbonCmdUI通过类友好对其具有后门。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.