tags:

views:

511

answers:

2

Hi Good day.

from my vc++ project. .rc file.

IDD_My_DIALOG DIALOGEX 0, 0, 233, 273 STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_OVERLAPPEDWINDOW | WS_EX_STATICEDGE | WS_EX_APPWINDOW CAPTION "AMEC FA Tool" FONT 8, "MS Shell Dlg", 0, 0, 0x1Q

How to change config a fixed dialog which size to length = 233 and hight = 273 ?

Any help will be appreciated.

BR! nano

A: 

Hi,

Revised.

When i removed the WS_THICKFRAME from the top code, the dialog window size will fixed. But my problem still exist.

How to make my dialog size resolution independence?

It works well at 1400 X 900 but not well at 1400 X 1050

Any help will be appreciated.

BR! nano

nano
If you make your screen resolution bigger then your dialog will shrink in size relative to the screen, but it is still the same size so it is resolution indpendent. Based on the information you have provided, it is very difficult to tell what problem you are trying to fix.
jussij
+1  A: 

What is the question here? Dialog sizes are entered in DLU's, a unit to help with dealing with dialog in a resolution-independent way. If your question is how to display a dialog that is always the same size on the screen, regardless of resolution settings, the answer is 'don't', but if you still must, you'll have to fickle with GetDeviceCaps() and calculate physical->logical->device-dependent conversions. See for example http://msdn.microsoft.com/en-us/library/bb226789%28VS.85%29.aspx and search for DLU on this site.

If your question is how to make a dialog that is a certain amount of pixels high and wide regardless of resolution the answer is again 'don't' but if you really must, use GetDialogBaseUnits() and friends to calculate the right size (in pixels) in OnInitDialog().

If you're asking for something else completely, please rephrase your question.

Roel