c++visual-studio-2015mfccdialogvisual-studio-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. 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?


Solution

  • 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.