0
votes

I'm trying to create a dialog based application using MFC, it seems that I can change the dialog size by dragging the corner of the dialog in the resource view, but is there a way to set the dialog size numerically such as 800 by 600?

1
In the resource view or in the code ?Blacktempel
@Blacktempel, preferably in the resource view.ZijunLost

1 Answers

5
votes

The size of a dialog is always calculated in DLUs (Dialog Base Units). This DLUs scale to pixels depending on the size of the dialogs font.

So inside the resource it it isn't possible to fix a dialog size to exactly a given pixel size. You need to do this at runtime with MoveWindow/SetWindowPos

More Infos about DLUs here in MapDialogRect