search for: dlu_x

Displaying 1 result from an estimated 1 matches for "dlu_x".

Did you mean: dlu_y
2009 Mar 09
1
Dialog base units implementation question
...ow if it is a bug or a "behaviour" CreateDialog, MapDialogRect and many api uses the dialog box base units to convert from dialog units to pixels. Seeing the implementation in wine and the results that real Windows o.s. do I think that instead of using these formulas: pixels_x = MulDiv(dlu_x, xBaseUnit, 4); pixels_y = MulDiv(dlu_y, yBaseUnit, 8); i get best results converting values to floating points and then rounding the result: pixels_x = (int)(((double)dlu_x * (double)xBaseUnit / 4.0) + 0.5); pixels_y = (int)(((double)dlu_y * (double)yBaseUnit / 8.0) + 0.5); If anyone can confir...