diff options
Diffstat (limited to 'src/ExpandVolume')
-rw-r--r-- | src/ExpandVolume/DlgExpandVolume.cpp | 4 | ||||
-rw-r--r-- | src/ExpandVolume/ExpandVolume.rc | 6 | ||||
-rw-r--r-- | src/ExpandVolume/WinMain.cpp | 26 | ||||
-rw-r--r-- | src/ExpandVolume/resource.h | 3 |
4 files changed, 34 insertions, 5 deletions
diff --git a/src/ExpandVolume/DlgExpandVolume.cpp b/src/ExpandVolume/DlgExpandVolume.cpp index ab76d1ba..eb3b06f6 100644 --- a/src/ExpandVolume/DlgExpandVolume.cpp +++ b/src/ExpandVolume/DlgExpandVolume.cpp @@ -147,6 +147,8 @@ BOOL CALLBACK ExpandVolSizeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA pVolExpandParam = (EXPAND_VOL_THREAD_PARAMS*)lParam; + LocalizeDialog (hwndDlg, NULL); + EnableWindow (GetDlgItem (hwndDlg, IDC_SIZEBOX), !pVolExpandParam->bIsDevice); EnableWindow (GetDlgItem (hwndDlg, IDC_KB), !pVolExpandParam->bIsDevice); EnableWindow (GetDlgItem (hwndDlg, IDC_MB), !pVolExpandParam->bIsDevice); @@ -309,6 +311,8 @@ BOOL CALLBACK ExpandVolProgressDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, L VirtualLock (&mouseEntropyGathered, sizeof(mouseEntropyGathered)); VirtualLock (maskRandPool, sizeof(maskRandPool)); + LocalizeDialog (hwndDlg, NULL); + mouseEntropyGathered = 0xFFFFFFFF; mouseEventsInitialCount = 0; bUseMask = FALSE; diff --git a/src/ExpandVolume/ExpandVolume.rc b/src/ExpandVolume/ExpandVolume.rc index 76e4cf10..2da61a18 100644 --- a/src/ExpandVolume/ExpandVolume.rc +++ b/src/ExpandVolume/ExpandVolume.rc @@ -40,7 +40,7 @@ BEGIN CONTROL "Fill new space with random data",IDC_INIT_NEWSPACE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,120,276,10 CONTROL "Quick Expand",IDC_QUICKEXPAND,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,30,132,276,10 - DEFPUSHBUTTON "Continue",IDOK,15,238,84,18 + DEFPUSHBUTTON "Continue",IDC_CONTINUE,15,238,84,18 PUSHBUTTON "Cancel",IDCANCEL,277,238,84,18 LTEXT "Help Text",IDC_BOX_HELP,15,165,346,58,0,WS_EX_CLIENTEDGE GROUPBOX "Enter new volume size",IDC_STATIC,15,83,346,63 @@ -73,7 +73,7 @@ BEGIN GROUPBOX "",IDC_STATIC,282,238,88,24 GROUPBOX "",IDC_STATIC,6,238,88,24 GROUPBOX "",IDC_STATIC,1,147,373,123,BS_CENTER - LTEXT "1. Select the VeraCrypt volume to be expanded\n2. Click the 'Mount' button",IDC_STATIC,15,156,293,21 + LTEXT "1. Select the VeraCrypt volume to be expanded\n2. Click the 'Mount' button",IDC_STEPSEXPAND,15,156,293,21 LTEXT "Static",IDC_INFOEXPAND,8,6,361,134,SS_NOPREFIX | SS_SUNKEN,WS_EX_STATICEDGE END @@ -121,7 +121,7 @@ BEGIN RTEXT "Volume: ",IDT_VOL_NAME,31,16,42,8 GROUPBOX "",IDC_STATIC,15,7,346,72 CONTROL "",IDC_EXPAND_VOLUME_NAME,"Static",SS_SIMPLE | WS_GROUP,80,16,275,8,WS_EX_TRANSPARENT - DEFPUSHBUTTON "Continue",IDOK,15,247,84,18 + DEFPUSHBUTTON "Continue",IDC_CONTINUE,15,247,84,18 PUSHBUTTON "Cancel",IDCANCEL,277,247,84,18 EDITTEXT IDC_BOX_STATUS,15,176,346,66,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL CONTROL "",IDC_EXPAND_VOLUME_INITSPACE,"Static",SS_SIMPLE | WS_GROUP,80,64,275,8,WS_EX_TRANSPARENT diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp index bcaaefa8..42f1c28d 100644 --- a/src/ExpandVolume/WinMain.cpp +++ b/src/ExpandVolume/WinMain.cpp @@ -199,6 +199,10 @@ BOOL CheckSysEncMountWithoutPBA (const char *devicePath, BOOL quiet) static void InitMainDialog (HWND hwndDlg) { + MENUITEMINFOW info; + int i; + wchar_t *str; + int menuEntries[] = {IDM_ABOUT, IDM_HOMEPAGE}; /* Call the common dialog init code */ InitDialog (hwndDlg); LocalizeDialog (hwndDlg, NULL); @@ -207,7 +211,27 @@ static void InitMainDialog (HWND hwndDlg) SetWindowTextW (hwndDlg, lpszTitle); SendMessage (GetDlgItem (hwndDlg, IDC_INFOEXPAND), WM_SETFONT, (WPARAM) hBoldFont, (LPARAM) TRUE); - SetWindowText (GetDlgItem (hwndDlg, IDC_INFOEXPAND), szExpandVolumeInfo); + SetWindowText (GetDlgItem (hwndDlg, IDC_INFOEXPAND), GetString("EXPANDER_INFO")); + + // Localize menu strings + for (i = 0; i < array_capacity (menuEntries); i++) + { + str = (wchar_t *)GetDictionaryValueByInt (menuEntries[i]); + if (str) + { + ZeroMemory (&info, sizeof(info)); + info.cbSize = sizeof (info); + info.fMask = MIIM_TYPE; + info.fType = MFT_STRING; + if (GetMenuItemInfoW (GetMenu (hwndDlg), menuEntries[i], FALSE, &info)) + { + info.dwTypeData = str; + info.cch = (UINT) wcslen (str); + + SetMenuItemInfoW (GetMenu (hwndDlg), menuEntries[i], FALSE, &info); + } + } + } // Resize the logo bitmap if the user has a non-default DPI if (ScreenDPI != USER_DEFAULT_SCREEN_DPI diff --git a/src/ExpandVolume/resource.h b/src/ExpandVolume/resource.h index 99d89dda..51fe1c0c 100644 --- a/src/ExpandVolume/resource.h +++ b/src/ExpandVolume/resource.h @@ -72,6 +72,7 @@ #define IDC_OLD_PIM_HELP 1144 #define ID_HOMEPAGE 1145 #define IDC_QUICKEXPAND 1146 +#define IDC_STEPSEXPAND 1147 #define IDM_HELP 40001 #define IDM_ABOUT 40002 #define IDM_UNMOUNT_VOLUME 40003 @@ -142,7 +143,7 @@ #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 120 #define _APS_NEXT_COMMAND_VALUE 40064 -#define _APS_NEXT_CONTROL_VALUE 1147 +#define _APS_NEXT_CONTROL_VALUE 1148 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif |