Home > Back-end >  About VC BMP image display, window shut down the problem by themselves
About VC BMP image display, window shut down the problem by themselves

Time:10-23

In MFC wrote a open image display program, but run to
: : StretchDIBits (pDC - & gt; GetSafeHdc (), 0, 0, cdib - & gt; M_pBitmapInfoHeader - & gt; BiWidth cdib - & gt; M_pBitmapInfoHeader - & gt; BiHeight, 0, 0, cdib - & gt; M_pBitmapInfoHeader - & gt; BiWidth cdib - & gt; M_pBitmapInfoHeader - & gt; BiHeight cdib - & gt; GetData (), cdib - & gt; GetInfo (), DIB_RGB_COLORS SRCCOPY);
This function, the window will automatically close; There is no problem to determine parameters has
Should be StretchDIBits function () is wrong, but I don't know what does this function USES the premises or to pay attention to what, explains, thank you

CodePudding user response:

You can take all the output parameters with variable substitution first see if there are values of each variable and effective, some like Pointers run fly you describe symptoms, quoting the protection code,
  • Related