Home > Software engineering >  The problem for the image CImage
The problem for the image CImage

Time:09-26

I'm OPaint else () function module code
CPaintDC dc (this);
if (! Img. The IsNull ()) img. Destroy ();
Img. Load (_T (" img/bg. PNG "));
if (! Img. The IsNull ())
{
Cx=img int. GetWidth ();
Int cy=img. GetHeight ();
Img. The Draw (dc. The m_hDC, 0, 0, cx, cy);
}

Can load images, but why loading pictures will be smaller and how to make loading pictures as large as the actual pictures

CodePudding user response:

The default should be scaled model, cancel the scaled and take three false or parameters

CodePudding user response:

Img. The Draw (dc m_hDC,
Cx, 0, 0, cy,//the target area
Cx, 0, 0, cy//source area
);
  • Related