简体   繁体   English

CButton派生的'SubclassDlgItem'在VS2015 CLR的CDialogBar上不可见,但响应按钮单击,在VC ++ 6中工作正常

[英]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.

相关问题 在VS2015 CLR上在CDialog派生类上创建返回0,在VC ++ 6中工作正常 - Create on a CDialog derived class returns 0 with VS2015 CLR, worked fine in VC++ 6 VS2015中的VC++目录 - VC++ directories in VS2015 构建时vs2015和vc ++外部依赖项错误 - vs2015 and vc++ external dependencies error on build vs2015:vc ++ for Linux Development没有这样的文件 - vs2015:vc++ for Linux Development no such file VS2015 C++ 错误地删除了 VC++ 目录属性页中的“包含目录”和“库目录” - VS2015 C++ Mistakenly erased "Include Directories" and "Library Directories" in VC++ Directories Property Page VS2015 / VC ++在新的类模板中禁用默认的#include“ stdafx.h” - VS2015/VC++ disable default #include “stdafx.h” in new class templates 如果使用低于VS2015的vc ++编译器版本进行编译,则DLL中的访问冲突 - Access violation in DLL if compiled with vc++ compiler version lower than VS2015 已使用VS2015项目和解决方案构建的vc ++解决方案清洁项目的msbuild - msbuild of a vc++ solution cleaning project after already built using VS2015 projects and solujtions VS2015在VC_IncludePath中修复路径问题 - VS2015 fixing path issue in VC_IncludePath VS2010 MSVC / VC ++的CLR gui可以双精度转换为String,可将String精度为Double的EditText文本框方法吗? - CLR gui for VS2010 MSVC / VC++ double to String, String to double methods for EditText Textboxes?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM