void CTuDlg :: OnPaint () {// TODO: Add your message handler code here CPaintDC dc (this); // device context for painting HBITMAP hbitmap; hbitmap = :: LoadBitmap (:: AfxGetInstanceHandle (), MAKEINTRESOURCE (IDB_BITMAP1)) HDC Hmendc = :: createcompatibledc (null); selectObject (hmendc, hbitmap); :: Stretchblt (dc.m_hdc, 0,0,1024,768, hmendc, 0,0,1024,768, srcopy; :: deletedc (Hmendc) ;: deleteObject (hbitmap); // do not call cforew :: onpaint () for Painting Messages
}