The conversion depends on the mapping mode of the device context, the settings of the origins and extents for the window and viewport, and the world transformation.
LOCAL hWindow, hDC, cBuffer
hWindow = _screen.HWnd
hDC = GetWindowDC(hWindow)
cBuffer = num2dword(100) + num2dword(100)
? DPtoLP(hDC, @cBuffer, 1)
? buf2dword(SUBSTR(cBuffer,1,4)),;
buf2dword(SUBSTR(cBuffer,5,4))
= ReleaseDC(hWindow, hDC)
See also: LPtoDP
|