The MFC CMFCRibbonCheckBox
class only supports IsChecked()
.
How do I change check status of ribbon check box in program code? Is there way to set check status like CButton::SetCheck()
.
you can copy code from CMFCRibbonCmdUI::SetCheck. CMFCRibbonBaseElement::m_bIsPressed is a protected member so you need to expose it via a derived class. CMFCRibbonCmdUI has a backdoor to it through class friendship.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.