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);