Подскажите, если кто знает.
Как перевести пиксели в диалоговые единицы?
Следующие формулы не работают так как нужно.
LONG GetDialogBaseUnits(VOID)
The horizontal base unit is equal to the average width, in pixels, of the characters in the system font; the vertical base unit is equal to the height, in pixels, of the font. Furthermore, each horizontal base unit is equal to 4 horizontal dialog units; each vertical base unit is equal to 8 vertical dialog units. Therefore, to convert dialog units to pixels, an application applies the following formulas:pixelX = (dialogunitX * baseunitX) / 4
pixelY = (dialogunitY * baseunitY) / 8Similarly, to convert from pixels to dialog units, an application applies the following formulas:
dialogunitX = (pixelX * 4) / baseunitX
dialogunitY = (pixelY * 8) / baseunitY
(