 | I have a question about this,
* scaling factor values from screen to printer xScale = GetDeviceCaps(hPrnDC, HORZRES)/(GetDeviceCaps(hPrnDC, HORZSIZE) * 100) yScale = GetDeviceCaps(hPrnDC, VERTRES)/(GetDeviceCaps(hPrnDC, VERTSIZE) * 100) rcMeta = num2dword(0) + num2dword(0) + num2dword(nWidth*xScale) + num2dword(nHeight*yScale)
The code following the comment, "scaling factor values from screen to printer" seems to only reference hPrnDC in each of the calls to GetDeviceCaps() -- no reference to a screen DC -- whereas in example #158, there is an identical comment which is followed by different code:
* scaling factor values from screen to printer xScale = GetDeviceCaps(hPrnDC, LOGPIXELSX)/GetDeviceCaps(hFormDC, LOGPIXELSX) yScale = GetDeviceCaps(hPrnDC, LOGPIXELSY)/GetDeviceCaps(hFormDC, LOGPIXELSY)
Please advise? Thanks. |  |