[英]CButton derived 'SubclassDlgItem's not visible on CDialogBar with VS2015 CLR, but respond to button clicks, worked fine in VC++ 6
I'm trying migrate a VC++ 6 based code to work with VS2015 CLR. 我正在尝试迁移基于VC ++ 6的代码以与VS2015 CLR一起使用。 I have major functionality working, but UI has some things missing.
我的主要功能正在运行,但是UI缺少一些东西。
There's a CDialogBar that hosts CWnd derived objects and CButton objects. 有一个CDialogBar承载CWnd派生对象和CButton对象。 CWnd derived objects are being display fine, but CButton objects are all invisible, but operate normally when clicked blindly.
CWnd派生的对象可以很好地显示,但是CButton对象都是不可见的,但是盲目单击即可正常运行。
m_CWndDerivedObj.SubclassDlgItem(IDC_XXXXXX,this);
m_CButtonObj.SubclassDlgItem(ID_XXXXXX,this);
Another CDialogBar with no CButton objects is being displayed properly. 没有CButton对象的另一个CDialogBar正在正确显示。
How may I get this to work? 我该如何工作?
I had to resolve this by moving to using Custom button class derived from CWnd. 我不得不通过使用派生自CWnd的“自定义”按钮类来解决此问题。 Original buttons were of type Command Button from Microsoft Forms 2.0.
原始按钮是Microsoft Forms 2.0中的Command Button类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.