From 5aca7788f891521104f8bed712672af236465cc1 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Wed, 12 Mar 2014 12:17:43 +0000 Subject: SetWindowLongPtr() and GetWindowLongPtr() multiple fixes for x64 git-svn-id: http://svn.miranda-ng.org/main/trunk@8571 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Exchange/src/dlg_handlers.cpp | 6 +++--- plugins/Exchange/src/emails.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/Exchange') diff --git a/plugins/Exchange/src/dlg_handlers.cpp b/plugins/Exchange/src/dlg_handlers.cpp index 631febea78..cc337564d5 100644 --- a/plugins/Exchange/src/dlg_handlers.cpp +++ b/plugins/Exchange/src/dlg_handlers.cpp @@ -192,7 +192,7 @@ INT_PTR CALLBACK DlgProcEmails(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam LVCOLUMN col = {0}; HWND hList = GetDlgItem(hWnd, IDC_EMAILS_LIST); - OldListProc = (WNDPROC) SetWindowLong(hList, GWLP_WNDPROC, (LONG) ListSubclassProc); + OldListProc = (WNDPROC) SetWindowLongPtr(hList, GWLP_WNDPROC, (LONG_PTR) ListSubclassProc); ListView_SetExtendedListViewStyle(hList, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES); col.mask = LVCF_TEXT | LVCF_WIDTH; col.cx = 100; @@ -223,7 +223,7 @@ INT_PTR CALLBACK DlgProcEmails(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam { HWND hList = GetDlgItem(hWnd, IDC_EMAILS_LIST); ListView_DeleteAllItems(hList); - int count = GetWindowLong(hWnd, GWLP_USERDATA); + int count = GetWindowLongPtr(hWnd, GWLP_USERDATA); LVITEM item = {0}; TEmailHeader email = {0}; email.cbSize = sizeof(TEmailHeader); @@ -313,7 +313,7 @@ INT_PTR CALLBACK DlgProcEmails(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam count = exchangeServer.GetUnreadEmailsCount(); if (count > 0) { - SetWindowLong(hWnd, GWLP_USERDATA, count); + SetWindowLongPtr(hWnd, GWLP_USERDATA, count); SendMessage(hWnd, EXM_UPDATE_EMAILS, 0, 0); } else SendMessage(hWnd, WM_CLOSE, 0, 0); diff --git a/plugins/Exchange/src/emails.cpp b/plugins/Exchange/src/emails.cpp index 96b85764a5..5dcd52d1d8 100644 --- a/plugins/Exchange/src/emails.cpp +++ b/plugins/Exchange/src/emails.cpp @@ -327,7 +327,7 @@ int ShowEmailsWindow(int cUnreadEmails) if (!hEmailsDlg) hEmailsDlg = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_EMAILS), NULL, DlgProcEmails); - SetWindowLong(hEmailsDlg, GWLP_USERDATA, cUnreadEmails); + SetWindowLongPtr(hEmailsDlg, GWLP_USERDATA, cUnreadEmails); if (IsWindowVisible(hEmailsDlg)) SendMessage(hEmailsDlg, EXM_UPDATE_EMAILS, 0, 0); else -- cgit v1.2.3