CRect rect;
SubmitPicture. GetClientRect (& amp; The rect);
CImage image;
Image. The Load (the result - & gt; PIC);
The CDC * pDC=PrintPicture. GetWindowDC ();
Image. The Draw (pDC - & gt; M_hDC, the rect);
SetStretchBltMode (pDC - & gt; M_hDC, COLORONCOLOR);
The ReleaseDC (pDC);
Run here will error
CodePudding user response:
Assertion point here ATLASSUME (m_hBitmap!=NULL)CodePudding user response:
CodePudding user response:
CRect rect;
SubmitPicture. GetClientRect (& amp; The rect);
CImage image;
Image. The Load (the result - & gt; PIC);
The CDC * pDC=PrintPicture. GetWindowDC ();
Image. The Draw (pDC - & gt; M_hDC, the rect);
SetStretchBltMode (pDC - & gt; M_hDC, COLORONCOLOR);
The ReleaseDC (pDC);
CodePudding user response:
Should be the images are not loading is successful, may be a routing problemShould determine whether load success
If (image. The Load (the result - & gt; PIC)==S_OK)
{
Image. The Draw
}
Or
if(! Image. The IsNull ())
{
Image. The Draw
}
CodePudding user response:
The breakpoint look at the image is validCodePudding user response: