0
votes

In this declaration syntax from https://msdn.microsoft.com/en-us/library/windows/desktop/aa381003(v=vs.85).aspx

nameID DIALOG x, y, width, height  [optional-statements] {control-statement  . . . }

what are the units used for width and height?

I assumed that they were pixels, and so set my window to 640x480. However, I now have a window that is too big for my needs.

1

1 Answers

1
votes

The units are dialog units as explained in the DIALOGEX resource definition statement. The DIALOG is deprecated. Excerpt:

x
Location on the screen of the left side of the dialog box, in dialog units.

y
Location on the screen of the top of the dialog box, in dialog units.

To retrieve the dialog based units use the GetDialogBaseUnits function. As per xMRi's suggestion, for a non system font use this technique.