Ui Problem in Vista and above
-
Vista and above windows OS have an option to change display [see below image] http://www.freeimagehosting.net/uploads/6704c49814.png[^] If user select any thing else other than 100% then my application ui gets disturb. Background image does not cover the whole dialog and labels do not contain whole text. Is there any way to fix that? This is how my screen looks like http://www.freeimagehosting.net/uploads/5e21dbde72.png[^] It's background is white but it is not getting stretch to cover the whole uncovered space when I change the display. In normal case (100% is set) it look fine. Any help ??
-
Vista and above windows OS have an option to change display [see below image] http://www.freeimagehosting.net/uploads/6704c49814.png[^] If user select any thing else other than 100% then my application ui gets disturb. Background image does not cover the whole dialog and labels do not contain whole text. Is there any way to fix that? This is how my screen looks like http://www.freeimagehosting.net/uploads/5e21dbde72.png[^] It's background is white but it is not getting stretch to cover the whole uncovered space when I change the display. In normal case (100% is set) it look fine. Any help ??
Actually this predates Vista; on the NT side, even Win 2000 let you change the font size (small fonts, large fonts). What you need to do is first handle the
WM_DISPLAYCHANGE
message, which tells you that some display setting has changed. Then, you need to resize and reposition the controls and background image to fit properly with the new settings. See (as an example) CResizableDialog[^].Best wishes, Hans
-
Vista and above windows OS have an option to change display [see below image] http://www.freeimagehosting.net/uploads/6704c49814.png[^] If user select any thing else other than 100% then my application ui gets disturb. Background image does not cover the whole dialog and labels do not contain whole text. Is there any way to fix that? This is how my screen looks like http://www.freeimagehosting.net/uploads/5e21dbde72.png[^] It's background is white but it is not getting stretch to cover the whole uncovered space when I change the display. In normal case (100% is set) it look fine. Any help ??
This link might be helpful: MFC applications now default to being DPI-aware[^]
Charles Oppermann
-
Actually this predates Vista; on the NT side, even Win 2000 let you change the font size (small fonts, large fonts). What you need to do is first handle the
WM_DISPLAYCHANGE
message, which tells you that some display setting has changed. Then, you need to resize and reposition the controls and background image to fit properly with the new settings. See (as an example) CResizableDialog[^].Best wishes, Hans
Thanks Hans, I will try it soon.
-
This link might be helpful: MFC applications now default to being DPI-aware[^]
Charles Oppermann
Thanks Charles, I just checked out "Enable DPI Awareness" property does not come in VS2008. I will checkout in VS2010 tomorrow. Thanks for the reply, -Rahul