Wanting2LearnMan
asked on
CBitmapButton SubclassDlgItem throwing an assert
I have an MFC button on my dialog. I wich to use bitmap buttons to give it a nice look. When I do the following:
CBitmapButton bmpOpt1;
m_bmpOpt1.SubclassDlgItem( IDC_BUTTON_1, this );
m_bmpOpt1.LoadBitmaps(IDB_ BITMAP_GRE ENNEW, IDB_BITMAP_GREENNEW, 0, IDB_XPBTNMENUDIS_BITMAP);
I get an assert error on the second line above:
m_bmpOpt1.SubclassDlgItem( IDC_BUTTON_1, this );
The assert error is:
Debug Assert Failed
File: f:\sp\vctools\vclibsce\shi p\atlmfc\s rc\mfc\win core.cpp Line 375;
Abort | Retry | Ignore
Why is this??
CBitmapButton bmpOpt1;
m_bmpOpt1.SubclassDlgItem(
m_bmpOpt1.LoadBitmaps(IDB_
I get an assert error on the second line above:
m_bmpOpt1.SubclassDlgItem(
The assert error is:
Debug Assert Failed
File: f:\sp\vctools\vclibsce\shi
Abort | Retry | Ignore
Why is this??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have took this out:
DDX_Control(pDX, IDC_BUTTON_1, m_button1);
and now its ok.
Thanks
DDX_Control(pDX, IDC_BUTTON_1, m_button1);
and now its ok.
Thanks
to be honest, I'd do the opposite :)
ASKER
DDX_Control(pDX, IDC_BUTTON_1, m_button1);
could this be causing problems???