From 23152a664c012fb8765c17a2544eef1d32e93a8a Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 13 Sep 2005 14:31:51 +0000 Subject: [PATCH] Authors: Richard Cohen , Jim Tabor, Thomas Weidenmueller 64 bit fixes -- Store Window procs as WNDPROC, cast to DWORD_PTR in SendMessageTimeout. --- programs/taskmgr/applpage.c | 6 +++--- programs/taskmgr/graph.c | 2 +- programs/taskmgr/graphctl.c | 2 +- programs/taskmgr/graphctl.h | 2 +- programs/taskmgr/perfpage.c | 6 +++--- programs/taskmgr/proclist.c | 2 +- programs/taskmgr/procpage.c | 2 +- programs/taskmgr/taskmgr.h | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/programs/taskmgr/applpage.c b/programs/taskmgr/applpage.c index 81187ce94ed..90d4d31e7b7 100644 --- a/programs/taskmgr/applpage.c +++ b/programs/taskmgr/applpage.c @@ -282,14 +282,14 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) /* Get the icon for this window */ hIcon = NULL; - SendMessageTimeout(hWnd, WM_GETICON, bLargeIcon ? ICON_BIG /*1*/ : ICON_SMALL /*0*/, 0, 0, 1000, (unsigned long*)&hIcon); + SendMessageTimeout(hWnd, WM_GETICON, bLargeIcon ? ICON_BIG /*1*/ : ICON_SMALL /*0*/, 0, 0, 1000, (PDWORD_PTR)&hIcon); if (!hIcon) { hIcon = (HICON)GetClassLongPtr(hWnd, bLargeIcon ? GCLP_HICON : GCLP_HICONSM); if (!hIcon) hIcon = (HICON)GetClassLongPtr(hWnd, bLargeIcon ? GCLP_HICONSM : GCLP_HICON); - if (!hIcon) SendMessageTimeout(hWnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (unsigned long*)&hIcon); - if (!hIcon) SendMessageTimeout(hWnd, WM_GETICON, bLargeIcon ? ICON_SMALL /*0*/ : ICON_BIG /*1*/, 0, 0, 1000, (unsigned long*)&hIcon); + if (!hIcon) SendMessageTimeout(hWnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (PDWORD_PTR)&hIcon); + if (!hIcon) SendMessageTimeout(hWnd, WM_GETICON, bLargeIcon ? ICON_SMALL /*0*/ : ICON_BIG /*1*/, 0, 0, 1000, (PDWORD_PTR)&hIcon); } if (!hIcon) diff --git a/programs/taskmgr/graph.c b/programs/taskmgr/graph.c index 708ec8fe73c..bdc60d44284 100644 --- a/programs/taskmgr/graph.c +++ b/programs/taskmgr/graph.c @@ -38,7 +38,7 @@ #define RED RGB(255, 0, 0) -LONG OldGraphWndProc; +WNDPROC OldGraphWndProc; void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd); void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd); diff --git a/programs/taskmgr/graphctl.c b/programs/taskmgr/graphctl.c index 40acc612285..9195426cecf 100644 --- a/programs/taskmgr/graphctl.c +++ b/programs/taskmgr/graphctl.c @@ -33,7 +33,7 @@ #include "graphctl.h" #include "taskmgr.h" -LONG OldGraphCtrlWndProc; +WNDPROC OldGraphCtrlWndProc; static void GraphCtrl_Init(TGraphCtrl* this) { diff --git a/programs/taskmgr/graphctl.h b/programs/taskmgr/graphctl.h index 9756637fa50..008556aa8b5 100644 --- a/programs/taskmgr/graphctl.h +++ b/programs/taskmgr/graphctl.h @@ -85,7 +85,7 @@ typedef struct RECT m_rectPlot; } TGraphCtrl; -extern LONG OldGraphCtrlWndProc; +extern WNDPROC OldGraphCtrlWndProc; double GraphCtrl_AppendPoint(TGraphCtrl* this, double dNewPoint0, double dNewPoint1, double dNewPoint2, double dNewPoint3); diff --git a/programs/taskmgr/perfpage.c b/programs/taskmgr/perfpage.c index a30aacf12ce..77bbc538a31 100644 --- a/programs/taskmgr/perfpage.c +++ b/programs/taskmgr/perfpage.c @@ -196,10 +196,10 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, /* * Subclass graph buttons */ - OldGraphWndProc = SetWindowLongPtr(hPerformancePageCpuUsageGraph, GWLP_WNDPROC, (LONG_PTR)Graph_WndProc); + OldGraphWndProc = (WNDPROC)SetWindowLongPtr(hPerformancePageCpuUsageGraph, GWLP_WNDPROC, (LONG_PTR)Graph_WndProc); SetWindowLongPtr(hPerformancePageMemUsageGraph, GWLP_WNDPROC, (LONG_PTR)Graph_WndProc); - OldGraphCtrlWndProc = SetWindowLongPtr(hPerformancePageMemUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc); - SetWindowLongPtr(hPerformancePageCpuUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc); + OldGraphCtrlWndProc = (WNDPROC)SetWindowLongPtr(hPerformancePageMemUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc); + SetWindowLongPtr(hPerformancePageCpuUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc); return TRUE; case WM_COMMAND: diff --git a/programs/taskmgr/proclist.c b/programs/taskmgr/proclist.c index 485d735e0f3..b3fe4c7df44 100644 --- a/programs/taskmgr/proclist.c +++ b/programs/taskmgr/proclist.c @@ -36,7 +36,7 @@ LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); -LONG OldProcessListWndProc; +WNDPROC OldProcessListWndProc; LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) diff --git a/programs/taskmgr/procpage.c b/programs/taskmgr/procpage.c index 7ac091f36f2..bb416770aa3 100644 --- a/programs/taskmgr/procpage.c +++ b/programs/taskmgr/procpage.c @@ -91,7 +91,7 @@ LRESULT CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPAR /* * Subclass the process list control so we can intercept WM_ERASEBKGND */ - OldProcessListWndProc = SetWindowLongPtr(hProcessPageListCtrl, GWLP_WNDPROC, (LONG_PTR)ProcessListWndProc); + OldProcessListWndProc = (WNDPROC)SetWindowLongPtr(hProcessPageListCtrl, GWLP_WNDPROC, (LONG_PTR)ProcessListWndProc); /* Start our refresh thread */ CreateThread(NULL, 0, ProcessPageRefreshThread, NULL, 0, NULL); diff --git a/programs/taskmgr/taskmgr.h b/programs/taskmgr/taskmgr.h index 20dcbb80035..6cd9181527e 100644 --- a/programs/taskmgr/taskmgr.h +++ b/programs/taskmgr/taskmgr.h @@ -124,8 +124,8 @@ extern int nOldWidth; /* Holds the previous client area width */ extern int nOldHeight; /* Holds the previous client area height */ extern TASKMANAGER_SETTINGS TaskManagerSettings; -extern LONG OldProcessListWndProc; -extern LONG OldGraphWndProc; +extern WNDPROC OldProcessListWndProc; +extern WNDPROC OldGraphWndProc; extern HWND hProcessPage; /* Process List Property Page */ extern HWND hProcessPageListCtrl; /* Process ListCtrl Window */