In a Microsoft Foundation Class (MFC) Libraried application for Windows, it is occasionally useful to be able to display a bitmap larger than a normal icon in a dialog box. This can either be done using the resource editor or at run time. To display a bitmap using the resource editor place a picture control on a dialog template. Bring up the properties dialog for the picture control and associate the control with a bitmap type (SS_BITMAP style) and an image by specifying a bitmap resource ID. If you want to associate a bitmap resource ID with the picture control only at run time or if you would like to change the bitmap at run time then use the function CStatic::SetBitmap(). To display a bitmap at runtime, the following are the four possible methods: BitBlt() a bitmap onto the dialog box in its OnDraw() handler. BitBlt() or StretchBlt() into a "static" frame control. BitBlt() or StretchBlt() in OnEraseBkgnd(). Use a CBitmapButton as a picture control.
To display a bitmap at runtime, the following are the four possible methods: BitBlt() a bitmap onto the dialog box in its OnDraw() handler.
BitBlt() or StretchBlt() into a "static" frame control.
BitBlt() or StretchBlt() in OnEraseBkgnd().
Use a CBitmapButton as a picture control.