I'm trying to convert dialog units to pixels using the win32 sdk
formula:
then to get the pixels:
But when I used it to create a window with CreateWindowEx I get wrong
dimentions.
When I use the build in function DIALOG UNITS hDlg, x, y TO PIXELS xx,yy
don't work because my dialog wasn't created with DDT; but this function
get correct values.
Anybody can help me converting dialog units to pixels with Api calls.
Steve Mc Gregor
formula:
Code:
Local lTemp As Long Local baseX As Long Local baseY As Long lTemp = GetDialogBaseUnits baseX = LoWrd(lTemp) baseY = HiWrd(lTemp)
Code:
PixelX = (DialogUnitX * baseX) / 4 PixelY = (DialogUnitY * baseY) / 8
dimentions.
When I use the build in function DIALOG UNITS hDlg, x, y TO PIXELS xx,yy
don't work because my dialog wasn't created with DDT; but this function
get correct values.

Anybody can help me converting dialog units to pixels with Api calls.
Steve Mc Gregor
Comment