tags:

views:

32

answers:

3

I am in process of creating a dialog IDD_DIALOG2 which i want to be in the same size as existing dialog IDD_DIALOG1, what would be the easiest way to do this in VC++?

+1  A: 

The sane way would be to look up the IDD_DIALOG1's dialog definition and use the same sizes.

If you don't have access to IDD_DIALOG1's dialog definition, you could bring up IDD_DIALOG1, use GetWindowRect() on it to record its actual size, close it, open IDD_DIALOG2, and then use MoveWindow() to resize to the same size. Not generally recommended, but it's possible.

mjfgates
+2  A: 

Just resize in design view. The dialog's size shows up in the status bar.

(you could also edit the .rc file and copy the 4 numbers that follow the dialog's ID)

djeidot
A: 

It's possible to copy & paste the dialog in the Resource View - all the controls come with it also.

Jeff