I’ve seen the other threads on this topic, but none of them work with MFC 2.5 since CButton::ModifyStyle()
and CButton::SetBitmap()
do not exist in MFC 2.5.
I’m making a dialog application using a Resource Editor to create a dialog with several buttons. The buttons are set to Owner Draw in the Editor. I’m using the following code:
void CMainDialog::OnInitDialog()
{
// to do: initialization
CBitmapButton m_Processor;
m_Processor.AutoLoad( IDC_CPU, this );
return TRUE;
}
The above code should have automatically loaded the bitmap resource I have created as IDB_CPU. However, on compile the button location just shows a blank space rather than loading the bitmap.
I have also tried this code:
void CMainDialog::OnInitDialog()
{
// to do: initialization
CBitmapButton m_Processor;
m_Processor.LoadBitmaps( IDB_CPU, NULL, NULL, NULL );
return TRUE;
}
But it produces the same result with just a blank space. I know the image exists in the bitmap (I can open it with Paint, for example), and I’ve verified the resource ID for IDB_CPU is properly set in the resource.h file.
Any help is appreciated!