MFC - CButton :: SetCheck()灰色框 [英] MFC - CButton::SetCheck() grey box

查看:374
本文介绍了MFC - CButton :: SetCheck()灰色框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


MFC中CButton类的setcheck()函数在菜单中显示一个灰色框而不是复选框。


谢谢。

解决方案

您好Login4545,


感谢发布这里。


>> MFC中CButton类的setcheck()函数在菜单中显示一个灰色框而不是复选框。


您是否尝试创建按钮或使用 CButton :: SetButtonStyle
BS_AUTOCHECKBOX或BS_CHECKBOX样式设置按钮样式?


这些样式将创建一个带有两个复选框的按钮states:BST_CHECKED和BST_UNCHECKED。有关按钮样式的更多信息,请参阅下面的文档。


https://msdn.microsoft.com/en-us/library/tf9hd91s.aspx


希望这可以为您提供帮助。


最诚挚的问候,


Sera Yu




<强>


Hi,

The setcheck() function of CButton class in MFC displays a grey box instead of checkbox in the menu which it was intended to do.

Thanks.

解决方案

Hi Login4545,

thanks for posting here.

>>The setcheck() function of CButton class in MFC displays a grey box instead of checkbox in the menu which it was intended to do.

Have you tried to create your button or use CButton::SetButtonStyle to set the button style with BS_AUTOCHECKBOX or BS_CHECKBOX style?

These styles will create a check box button with two states: BST_CHECKED and BST_UNCHECKED. For more information about button style, please refer to this document below.

https://msdn.microsoft.com/en-us/library/tf9hd91s.aspx

Hope this could be help of you.

Best Regards,

Sera Yu


这篇关于MFC - CButton :: SetCheck()灰色框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆