此声明语法来自 https://msdn.microsoft.com/en-us/library/windows/desktop/aa381003(v=vs.85).aspx
nameID DIALOG x, y, width, height [optional-statements] {control-statement . . . }
宽度和高度的单位是什么?
我假设它们是像素,因此将我的窗口设置为 640x480。但是,我现在的窗口太大了,无法满足我的需求。
最佳答案
单位是对话单位,如 DIALOGEX 中所述。资源定义语句。 DIALOG
已弃用。摘录:
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.
要检索基于对话框的单位,请使用 GetDialogBaseUnits 功能。根据 xMRi 的建议,对于非系统字体,请使用 this technique .
关于c++ - Dialog MFC 资源测量的单位是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45297886/