Michael Stefaniuc : taskmgr: Cast to LPARAM the 4th argument passed to SendMessage.
Alexandre Julliard
julliard at winehq.org
Tue Mar 3 11:53:41 CST 2009
Module: wine
Branch: master
Commit: 87b15bb9fd1753993d169f610bca579db683667b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=87b15bb9fd1753993d169f610bca579db683667b
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Mon Mar 2 23:26:51 2009 +0100
taskmgr: Cast to LPARAM the 4th argument passed to SendMessage.
Casting to long would truncate the pointers when compiling with MSVC
for Win64.
---
programs/taskmgr/taskmgr.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/programs/taskmgr/taskmgr.c b/programs/taskmgr/taskmgr.c
index 8ba832e..b30ed8e 100644
--- a/programs/taskmgr/taskmgr.c
+++ b/programs/taskmgr/taskmgr.c
@@ -151,7 +151,7 @@ static BOOL OnCreate(HWND hWnd)
nParts[0] = 100;
nParts[1] = 210;
nParts[2] = 400;
- SendMessageW(hStatusWnd, SB_SETPARTS, 3, (long)nParts);
+ SendMessageW(hStatusWnd, SB_SETPARTS, 3, (LPARAM)nParts);
/* Create tab pages */
hTabWnd = GetDlgItem(hWnd, IDC_TAB);
@@ -518,7 +518,7 @@ static void TaskManager_OnEnterMenuLoop(HWND hWnd)
/* Update the status bar pane sizes */
nParts = -1;
- SendMessageW(hStatusWnd, SB_SETPARTS, 1, (long)&nParts);
+ SendMessageW(hStatusWnd, SB_SETPARTS, 1, (LPARAM)&nParts);
bInMenuLoop = TRUE;
SendMessageW(hStatusWnd, SB_SETTEXTW, 0, 0);
}
@@ -538,7 +538,7 @@ static void TaskManager_OnExitMenuLoop(HWND hWnd)
nParts[0] = 100;
nParts[1] = 210;
nParts[2] = rc.right;
- SendMessageW(hStatusWnd, SB_SETPARTS, 3, (long)nParts);
+ SendMessageW(hStatusWnd, SB_SETPARTS, 3, (LPARAM)nParts);
SendMessageW(hStatusWnd, SB_SETTEXT, 0, 0);
wsprintfW(text, wszCPU_Usage, PerfDataGetProcessorUsage());
SendMessageW(hStatusWnd, SB_SETTEXTW, 1, (LPARAM)text);
More information about the wine-cvs
mailing list