简体   繁体   中英

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. I have major functionality working, but UI has some things missing.

There's a CDialogBar that hosts CWnd derived objects and CButton objects. CWnd derived objects are being display fine, but CButton objects are all invisible, but operate normally when clicked blindly.

m_CWndDerivedObj.SubclassDlgItem(IDC_XXXXXX,this);
m_CButtonObj.SubclassDlgItem(ID_XXXXXX,this);

Another CDialogBar with no CButton objects is being displayed properly.

How may I get this to work?

I had to resolve this by moving to using Custom button class derived from CWnd. Original buttons were of type Command Button from Microsoft Forms 2.0.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM