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);
Please use meaningful question titles - "Help me" does not let me know whether I can help with your question, and I am unlikely to bother reading it.
Please remember to rate useful answers. It lets us know when a question has been answered.