Re: How to create DC with specific resolution?
This should do what you need, at a first attempt (not tested)
Code:
int dpiX = dc.GetDeviceCaps(LOGPIXELSX);
int dpiY = dc.GetDeviceCaps(LOGPIXELSY);
double xScale = requiredDpi / dpiX;
double yScale = requiredDpi / dpiY;
XFORM format;
format.eM11 = xScale;
format.eM12 = 0.0;
format.eM21 = 0.0;
format.eM22 = yScale;
SetWorldTransform(dc.GetSfaeHdc(), &format);
Re: How to create DC with specific resolution?
Hi RogerAllen,
Thanks again for the help :)
I have tested your code and the quality of the image is still the same with 96dpi. What I really want to achive is to get the bitmap contains 200dots per inch instead of 96dots per inch.
Do you think it is possible? I am really stuck. Please help...
Thanks for any help again, in advance.
Cheers :)