mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-30 23:13:31 +01:00
Windows: Fix buttons at the bottom not shown when user sets a large system font under Window 7
This commit is contained in:
parent
2576290e7b
commit
638f717d90
@ -537,6 +537,21 @@ static void InitMainDialog (HWND hwndDlg)
|
||||
|
||||
SendMessage (GetDlgItem (hwndDlg, IDC_NO_HISTORY), BM_SETCHECK, bHistory ? BST_UNCHECKED : BST_CHECKED, 0);
|
||||
EnableDisableButtons (hwndDlg);
|
||||
|
||||
// Ensure bottom buttons are visible if the user sets a large font size
|
||||
RECT mainRectScreen, boxRectScreen;
|
||||
ULONG mainHeigth, mainWidth, correctHeigth;
|
||||
GetWindowRect (hwndDlg, &mainRectScreen);
|
||||
GetWindowRect (GetDlgItem (hwndDlg, IDC_LOWER_BOX), &boxRectScreen);
|
||||
|
||||
mainHeigth = mainRectScreen.bottom - mainRectScreen.top;
|
||||
mainWidth = mainRectScreen.right - mainRectScreen.left;
|
||||
correctHeigth = boxRectScreen.bottom - mainRectScreen.top + CompensateYDPI (5);
|
||||
|
||||
if (mainHeigth < correctHeigth)
|
||||
{
|
||||
SetWindowPos (hwndDlg, NULL, 0, 0, mainWidth, correctHeigth , SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE | SWP_SHOWWINDOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ BEGIN
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,190,242,88,20
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,6,242,88,20
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,98,242,88,20
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,2,151,372,119
|
||||
CONTROL "",IDC_LOWER_BOX,"Static",SS_ETCHEDFRAME,2,151,372,119
|
||||
END
|
||||
|
||||
IDD_PASSWORD_DLG DIALOGEX 0, 0, 330, 103
|
||||
|
@ -190,6 +190,7 @@
|
||||
#define IDC_ALLOW_TRIM_NONSYS_SSD 1167
|
||||
#define IDC_BLOCK_SYSENC_TRIM 1168
|
||||
#define IDC_ALLOW_WINDOWS_DEFRAG 1169
|
||||
#define IDC_LOWER_BOX 1170
|
||||
#define IDM_HELP 40001
|
||||
#define IDM_ABOUT 40002
|
||||
#define IDM_UNMOUNT_VOLUME 40003
|
||||
@ -266,7 +267,7 @@
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 120
|
||||
#define _APS_NEXT_COMMAND_VALUE 40069
|
||||
#define _APS_NEXT_CONTROL_VALUE 1170
|
||||
#define _APS_NEXT_CONTROL_VALUE 1171
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user