Programmatically changing an image in a dialog app
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
-
Hi, I would like to know how I could programmatically change an image in a dialog. For example, by clicking on a button, it would change IDC_IMAGE1 to IDC_IMAGE2 for example. Code examples would be appreciated or reference to an article. Thanks Ashley
http://www.codeproject.com/bitmap/
// Delete bitmap handle to button ::DeleteObject(hbmButton)) hbmButton=::LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_NEW_BITMAP)); if (hbmButton != NULL) { m_ButtonCtrl.SetBitmap(hbmButton); }