Picture control
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
hi every body am back . how can i load the image by using picture control in an SDI and even in dialog box Application . thanking you sarfaraz :(
-
hi every body am back . how can i load the image by using picture control in an SDI and even in dialog box Application . thanking you sarfaraz :(
If you have added a picture control to your dialog using the dialog editor, gave that control an ID (it is initialized with
IDC_STATIC
) and add aCStatic
member variable for the control to your dialog class. Then load the bitmap from your resources from withinOnInitDialog()
:m_staticPic.SetBitmap(::LoadBitmap(NULL, MAKEINTRESOURCE(OBM_PIC1)));
See also
CStatic::SetBitmap
in the MFC library reference [^].