diff options
Diffstat (limited to 'updater/progress_dialog.cpp')
-rw-r--r-- | updater/progress_dialog.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/updater/progress_dialog.cpp b/updater/progress_dialog.cpp index 886ba76..0ee0726 100644 --- a/updater/progress_dialog.cpp +++ b/updater/progress_dialog.cpp @@ -12,11 +12,11 @@ HWND hwndProgress = 0; unsigned int dwProgressThreadId = 0;
HANDLE hProgSyncEvent = 0;
-BOOL CALLBACK DlgProcProgress(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+INT_PTR CALLBACK DlgProcProgress(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
switch ( msg ) {
case WM_INITDIALOG:
TranslateDialogDefault( hwndDlg );
- SetWindowLong(hwndDlg, GWL_USERDATA, 0);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
// these change icons for all system dialogs!
//SetClassLong(hwndDlg, GCL_HICON, (LONG)hIconCheck);
//SetClassLong(hwndDlg, GCL_HICONSM, (LONG)hIconCheck);
@@ -33,8 +33,8 @@ BOOL CALLBACK DlgProcProgress(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar if(wParam == ID_PROGTIMER) {
TCHAR text[512];
GetDlgItemText(hwndDlg, IDC_PROGMSG, text, 512);
- int len = _tcslen(text);
- int pos = (int)GetWindowLong(hwndDlg, GWL_USERDATA);
+ size_t len = _tcslen(text);
+ INT_PTR pos = (INT_PTR)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if(len >= 3 && len < 511) {
pos = (pos + 1) % 4;
if(pos == 0)
@@ -42,7 +42,7 @@ BOOL CALLBACK DlgProcProgress(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar else
_tcscat(text, _T("."));
SetDlgItemText(hwndDlg, IDC_PROGMSG, text);
- SetWindowLong(hwndDlg, GWL_USERDATA, pos);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, pos);
}
return TRUE;
}
@@ -50,7 +50,7 @@ BOOL CALLBACK DlgProcProgress(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar case WMU_SETMESSAGE:
KillTimer(hwndDlg, ID_PROGTIMER);
SetDlgItemText(hwndDlg, IDC_PROGMSG, (TCHAR *)wParam);
- SetWindowLong(hwndDlg, GWL_USERDATA, 0);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
SetTimer(hwndDlg, ID_PROGTIMER, (WPARAM)500, 0);
return TRUE;
case WMU_SETPROGRESS:
|