Click to See Complete Forum and Search --> : From screen to dialog units


kkez
October 28th, 2005, 08:20 AM
I tried:
1) GetDialogBaseUnits (font vary, so there's no way i can use this )
2) GetTextExtent or GetTextExtentPoint32 with getDC
3) WM_GETFONT or GetCurrentObject with LOGFONT
(of course all with MulDiv)

but no one of these methods give me the right dimensions of a dialog control in dialog units. :(

olivthill
October 28th, 2005, 08:44 AM
With GetDialogBaseUnits(), you get the dialog box base units used by Windows when creating dialog boxes.

You can have the size of a button with GetClientRect() or GetWindowRect() because buttons are child windows.

kkez
October 28th, 2005, 10:12 AM
With GetDialogBaseUnits(), you get the dialog box base units used by Windows when creating dialog boxes. 1) GetDialogBaseUnits (font vary, so there's no way i can use this )
;)
You can have the size of a button with GetClientRect() or GetWindowRect() because buttons are child windows.
Ok thanks. :)