Commit 23152a66 authored by Alexandre Julliard's avatar Alexandre Julliard

Authors: Richard Cohen <richard@daijobu.co.uk>, Jim Tabor, Thomas Weidenmueller…

Authors: Richard Cohen <richard@daijobu.co.uk>, Jim Tabor, Thomas Weidenmueller <wine-patches@reactsoft.com> 64 bit fixes -- Store Window procs as WNDPROC, cast to DWORD_PTR in SendMessageTimeout.
parent aa0da302
...@@ -282,14 +282,14 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) ...@@ -282,14 +282,14 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
/* Get the icon for this window */ /* Get the icon for this window */
hIcon = NULL; 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) if (!hIcon)
{ {
hIcon = (HICON)GetClassLongPtr(hWnd, bLargeIcon ? GCLP_HICON : GCLP_HICONSM); hIcon = (HICON)GetClassLongPtr(hWnd, bLargeIcon ? GCLP_HICON : GCLP_HICONSM);
if (!hIcon) hIcon = (HICON)GetClassLongPtr(hWnd, bLargeIcon ? GCLP_HICONSM : GCLP_HICON); 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_QUERYDRAGICON, 0, 0, 0, 1000, (PDWORD_PTR)&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_GETICON, bLargeIcon ? ICON_SMALL /*0*/ : ICON_BIG /*1*/, 0, 0, 1000, (PDWORD_PTR)&hIcon);
} }
if (!hIcon) if (!hIcon)
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#define RED RGB(255, 0, 0) #define RED RGB(255, 0, 0)
LONG OldGraphWndProc; WNDPROC OldGraphWndProc;
void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd); void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd);
void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd); void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd);
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "graphctl.h" #include "graphctl.h"
#include "taskmgr.h" #include "taskmgr.h"
LONG OldGraphCtrlWndProc; WNDPROC OldGraphCtrlWndProc;
static void GraphCtrl_Init(TGraphCtrl* this) static void GraphCtrl_Init(TGraphCtrl* this)
{ {
......
...@@ -85,7 +85,7 @@ typedef struct ...@@ -85,7 +85,7 @@ typedef struct
RECT m_rectPlot; RECT m_rectPlot;
} TGraphCtrl; } TGraphCtrl;
extern LONG OldGraphCtrlWndProc; extern WNDPROC OldGraphCtrlWndProc;
double GraphCtrl_AppendPoint(TGraphCtrl* this, double GraphCtrl_AppendPoint(TGraphCtrl* this,
double dNewPoint0, double dNewPoint1, double dNewPoint0, double dNewPoint1,
double dNewPoint2, double dNewPoint3); double dNewPoint2, double dNewPoint3);
......
...@@ -196,10 +196,10 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, ...@@ -196,10 +196,10 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam,
/* /*
* Subclass graph buttons * 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); SetWindowLongPtr(hPerformancePageMemUsageGraph, GWLP_WNDPROC, (LONG_PTR)Graph_WndProc);
OldGraphCtrlWndProc = SetWindowLongPtr(hPerformancePageMemUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc); OldGraphCtrlWndProc = (WNDPROC)SetWindowLongPtr(hPerformancePageMemUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc);
SetWindowLongPtr(hPerformancePageCpuUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc); SetWindowLongPtr(hPerformancePageCpuUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc);
return TRUE; return TRUE;
case WM_COMMAND: case WM_COMMAND:
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); 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) LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
......
...@@ -91,7 +91,7 @@ LRESULT CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPAR ...@@ -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 * 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 */ /* Start our refresh thread */
CreateThread(NULL, 0, ProcessPageRefreshThread, NULL, 0, NULL); CreateThread(NULL, 0, ProcessPageRefreshThread, NULL, 0, NULL);
......
...@@ -124,8 +124,8 @@ extern int nOldWidth; /* Holds the previous client area width */ ...@@ -124,8 +124,8 @@ extern int nOldWidth; /* Holds the previous client area width */
extern int nOldHeight; /* Holds the previous client area height */ extern int nOldHeight; /* Holds the previous client area height */
extern TASKMANAGER_SETTINGS TaskManagerSettings; extern TASKMANAGER_SETTINGS TaskManagerSettings;
extern LONG OldProcessListWndProc; extern WNDPROC OldProcessListWndProc;
extern LONG OldGraphWndProc; extern WNDPROC OldGraphWndProc;
extern HWND hProcessPage; /* Process List Property Page */ extern HWND hProcessPage; /* Process List Property Page */
extern HWND hProcessPageListCtrl; /* Process ListCtrl Window */ extern HWND hProcessPageListCtrl; /* Process ListCtrl Window */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment