VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount/Mount.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-09-20 17:24:09 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-09-26 17:43:51 +0200
commitd98367f53b9a1268845d68cde1d02bd6ca35f213 (patch)
treebbd7ac1182187edcae0d4af015fded01bfb60b2d /src/Mount/Mount.c
parent03de885b133fe7355a1d758ad91cf374132f516f (diff)
downloadVeraCrypt-d98367f53b9a1268845d68cde1d02bd6ca35f213.tar.gz
VeraCrypt-d98367f53b9a1268845d68cde1d02bd6ca35f213.zip
Window: Solve Unicode issues in GUI (e.g. Chinese text not always displayed correctly) by using Unicode API for dialogs and window message handling.
Diffstat (limited to 'src/Mount/Mount.c')
-rw-r--r--src/Mount/Mount.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 0895915a..122f8f00 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -298,11 +298,11 @@ static void InitMainDialog (HWND hwndDlg)
InitDialog (hwndDlg);
LocalizeDialog (hwndDlg, NULL);
- SetWindowLongPtr (hwndDlg, DWLP_USER, (LONG_PTR) (IsAdmin() ? TC_MAIN_WINDOW_FLAG_ADMIN_PRIVILEGES : 0));
+ SetWindowLongPtrW (hwndDlg, DWLP_USER, (LONG_PTR) (IsAdmin() ? TC_MAIN_WINDOW_FLAG_ADMIN_PRIVILEGES : 0));
DragAcceptFiles (hwndDlg, TRUE);
- SendMessage (GetDlgItem (hwndDlg, IDC_VOLUME), CB_LIMITTEXT, TC_MAX_PATH, 0);
+ SendMessageW (GetDlgItem (hwndDlg, IDC_VOLUME), CB_LIMITTEXT, TC_MAX_PATH, 0);
SetWindowTextW (hwndDlg, (IsAdmin() && !IsBuiltInAdmin() && IsUacSupported() && !IsNonInstallMode()) ? (wstring (lpszTitle) + L" [" + GetString ("ADMINISTRATOR") + L"]").c_str() : lpszTitle);
// Help file name
@@ -6285,7 +6285,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
EnumWindows (FindTCWindowEnum, (LPARAM) &h);
if (h != hwndDlg
- && (!IsAdmin() || (GetWindowLongPtr (h, DWLP_USER) & TC_MAIN_WINDOW_FLAG_ADMIN_PRIVILEGES) != 0))
+ && (!IsAdmin() || (GetWindowLongPtrW (h, DWLP_USER) & TC_MAIN_WINDOW_FLAG_ADMIN_PRIVILEGES) != 0))
{
if (CmdLineVolumeSpecified)
{
@@ -10511,7 +10511,7 @@ static BOOL HandleDriveListMouseWheelEvent (UINT uMsg, WPARAM wParam, LPARAM lPa
static LRESULT CALLBACK MouseWheelProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- WNDPROC wp = (WNDPROC) GetWindowLongPtr (hwnd, GWLP_USERDATA);
+ WNDPROC wp = (WNDPROC) GetWindowLongPtrW (hwnd, GWLP_USERDATA);
switch (message)
{
@@ -10521,7 +10521,7 @@ static LRESULT CALLBACK MouseWheelProc (HWND hwnd, UINT message, WPARAM wParam,
return 0; // Do not process this event any further e.g. to prevent two lists from being scrolled at once
}
- return CallWindowProc (wp, hwnd, message, wParam, lParam);
+ return CallWindowProcW (wp, hwnd, message, wParam, lParam);
}
@@ -10529,6 +10529,6 @@ void HookMouseWheel (HWND hwndDlg, UINT ctrlId)
{
HWND hwndCtrl = GetDlgItem (hwndDlg, ctrlId);
- SetWindowLongPtr (hwndCtrl, GWLP_USERDATA, (LONG_PTR) GetWindowLongPtr (hwndCtrl, GWLP_WNDPROC));
- SetWindowLongPtr (hwndCtrl, GWLP_WNDPROC, (LONG_PTR) MouseWheelProc);
+ SetWindowLongPtrW (hwndCtrl, GWLP_USERDATA, (LONG_PTR) GetWindowLongPtrW (hwndCtrl, GWLP_WNDPROC));
+ SetWindowLongPtrW (hwndCtrl, GWLP_WNDPROC, (LONG_PTR) MouseWheelProc);
}