Y
youqiang_wu
Guest
reference to: MFC applications now default to being DPI-aware | C++ Team Blog
MFC applications now defaut to being DPI-aware , but it also exists that text string are cutted off in hight dpi ,specially in 125dpi
the following code is the rc in vs2017:
IDD_DPITEST_DIALOG DIALOGEX 0, 0, 265, 58
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "dpiTest"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "",IDC_STATIC,96,24,9,9,SS_NOTIFY
LTEXT "",IDC_STATIC,89,10,9,9,SS_NOTIFY
CONTROL "Te&xt-based document",IDC_STATIC,"Button",BS_AUTORADIOBUTTON | WS_GROUP,6,10,81,10
CONTROL "&Image-based document",IDC_STATIC,"Button",BS_AUTORADIOBUTTON,6,23,85,10
DEFPUSHBUTTON "OK",IDOK,209,37,50,14
PUSHBUTTON "Cancel",IDCANCEL,208,37,50,14
END
it is normal in 100 or 150 dpi in my pc
but it is cutted off in 125 or 175 dpi in vs2017
The solution I can think of is to widen the corresponding truncated control resources
Is there any other solution to solve it completely?
Continue reading...
MFC applications now defaut to being DPI-aware , but it also exists that text string are cutted off in hight dpi ,specially in 125dpi
the following code is the rc in vs2017:
IDD_DPITEST_DIALOG DIALOGEX 0, 0, 265, 58
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "dpiTest"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "",IDC_STATIC,96,24,9,9,SS_NOTIFY
LTEXT "",IDC_STATIC,89,10,9,9,SS_NOTIFY
CONTROL "Te&xt-based document",IDC_STATIC,"Button",BS_AUTORADIOBUTTON | WS_GROUP,6,10,81,10
CONTROL "&Image-based document",IDC_STATIC,"Button",BS_AUTORADIOBUTTON,6,23,85,10
DEFPUSHBUTTON "OK",IDOK,209,37,50,14
PUSHBUTTON "Cancel",IDCANCEL,208,37,50,14
END
it is normal in 100 or 150 dpi in my pc
but it is cutted off in 125 or 175 dpi in vs2017
The solution I can think of is to widen the corresponding truncated control resources
Is there any other solution to solve it completely?
Continue reading...