Alex7777qq
asked on
Can not add bitmap image as background in C++ MFC button control
Hello,
I can not add a bitmap as background on a Button Control in C++, MFC. I am using Visual Studio 2005.
I have set the button property "Bitmap" to true, and I am using the code below in
BOOL Ceduinst5Dlg::OnInitDialog (), but the button stil does not have the bitmap as a background.
I have tried adding the same code to BN_CLICKED event, then calling Invalidate(), but it again does not work.
What can I do to solve this problem?
Thanks,
Alex
I can not add a bitmap as background on a Button Control in C++, MFC. I am using Visual Studio 2005.
I have set the button property "Bitmap" to true, and I am using the code below in
BOOL Ceduinst5Dlg::OnInitDialog
I have tried adding the same code to BN_CLICKED event, then calling Invalidate(), but it again does not work.
What can I do to solve this problem?
Thanks,
Alex
CButton *pWnd = (CButton *) Ceduinst5Dlg::GetDlgItem(IDC_BUTTON1);
pWnd->SetBitmap(::LoadBitmap(NULL, MAKEINTRESOURCE(IDB_BITMAP1)));
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.