From 86663762ec348357359cdf42c6f8eb6af2aa5ce1 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 14 Sep 2005 10:06:09 +0000 Subject: [PATCH] Authors: Thomas Weidenmueller , Filip Navara DLGPROCs return INT_PTR. --- programs/taskmgr/about.c | 7 ++++--- programs/taskmgr/affinity.c | 7 ++++--- programs/taskmgr/applpage.c | 3 ++- programs/taskmgr/column.c | 9 +++++---- programs/taskmgr/dbgchnl.c | 4 ++-- programs/taskmgr/graph.c | 3 ++- programs/taskmgr/graphctl.c | 3 ++- programs/taskmgr/graphctl.h | 2 +- programs/taskmgr/perfpage.c | 3 ++- programs/taskmgr/proclist.c | 2 +- programs/taskmgr/procpage.c | 3 ++- programs/taskmgr/taskmgr.c | 17 +++++++++-------- programs/taskmgr/taskmgr.h | 10 +++++----- 13 files changed, 41 insertions(+), 32 deletions(-) diff --git a/programs/taskmgr/about.c b/programs/taskmgr/about.c index 5e1597e332f..836130ce746 100644 --- a/programs/taskmgr/about.c +++ b/programs/taskmgr/about.c @@ -31,14 +31,15 @@ #include "taskmgr.h" -LRESULT CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); void OnAbout(void) { - DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hMainWnd, (DLGPROC)AboutDialogWndProc); + DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hMainWnd, AboutDialogWndProc); } -LRESULT CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK +AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { HWND hLicenseEditWnd; TCHAR strLicense[0x1000]; diff --git a/programs/taskmgr/affinity.c b/programs/taskmgr/affinity.c index b6911740fc6..c73054a980a 100644 --- a/programs/taskmgr/affinity.c +++ b/programs/taskmgr/affinity.c @@ -35,7 +35,7 @@ HANDLE hProcessAffinityHandle; -LRESULT CALLBACK AffinityDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK AffinityDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); void ProcessPage_OnSetAffinity(void) { @@ -62,14 +62,15 @@ void ProcessPage_OnSetAffinity(void) MessageBox(hMainWnd, strErrorText, _T("Unable to Access or Set Process Affinity"), MB_OK|MB_ICONSTOP); return; } - DialogBox(hInst, MAKEINTRESOURCE(IDD_AFFINITY_DIALOG), hMainWnd, (DLGPROC)AffinityDialogWndProc); + DialogBox(hInst, MAKEINTRESOURCE(IDD_AFFINITY_DIALOG), hMainWnd, AffinityDialogWndProc); if (hProcessAffinityHandle) { CloseHandle(hProcessAffinityHandle); hProcessAffinityHandle = NULL; } } -LRESULT CALLBACK AffinityDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK +AffinityDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { DWORD dwProcessAffinityMask = 0; DWORD dwSystemAffinityMask = 0; diff --git a/programs/taskmgr/applpage.c b/programs/taskmgr/applpage.c index 90d4d31e7b7..695357885f1 100644 --- a/programs/taskmgr/applpage.c +++ b/programs/taskmgr/applpage.c @@ -64,7 +64,8 @@ BOOL bRestore /* Restore the window if it is minimized */ ); #endif -LRESULT CALLBACK ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK +ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { RECT rc; int nXDifference; diff --git a/programs/taskmgr/column.c b/programs/taskmgr/column.c index 0b8ef5545d6..900999659cd 100644 --- a/programs/taskmgr/column.c +++ b/programs/taskmgr/column.c @@ -34,8 +34,8 @@ UINT ColumnDataHints[25]; -int InsertColumn(int nCol, LPCTSTR lpszColumnHeading, int nFormat, int nWidth, int nSubItem); -LRESULT CALLBACK ColumnsDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +int InsertColumn(int nCol, LPCTSTR lpszColumnHeading, int nFormat, int nWidth, int nSubItem); +INT_PTR CALLBACK ColumnsDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); void AddColumns(void) { @@ -329,7 +329,7 @@ void ProcessPage_OnViewSelectColumns(void) { int i; - if (DialogBox(hInst, MAKEINTRESOURCE(IDD_COLUMNS_DIALOG), hMainWnd, (DLGPROC)ColumnsDialogWndProc) == IDOK) + if (DialogBox(hInst, MAKEINTRESOURCE(IDD_COLUMNS_DIALOG), hMainWnd, ColumnsDialogWndProc) == IDOK) { for (i=Header_GetItemCount(hProcessPageHeaderCtrl)-1; i>=0; i--) { @@ -369,7 +369,8 @@ void ProcessPage_OnViewSelectColumns(void) } } -LRESULT CALLBACK ColumnsDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK +ColumnsDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) diff --git a/programs/taskmgr/dbgchnl.c b/programs/taskmgr/dbgchnl.c index aec460d898c..ffd65b5675e 100644 --- a/programs/taskmgr/dbgchnl.c +++ b/programs/taskmgr/dbgchnl.c @@ -348,7 +348,7 @@ static void DebugChannels_OnNotify(HWND hDlg, LPARAM lParam) } } -static LRESULT CALLBACK DebugChannelsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +static INT_PTR CALLBACK DebugChannelsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -371,5 +371,5 @@ static LRESULT CALLBACK DebugChannelsDlgProc(HWND hDlg, UINT message, WPARAM wPa void ProcessPage_OnDebugChannels(void) { - DialogBox(hInst, (LPCTSTR)IDD_DEBUG_CHANNELS_DIALOG, hMainWnd, (DLGPROC)DebugChannelsDlgProc); + DialogBox(hInst, (LPCTSTR)IDD_DEBUG_CHANNELS_DIALOG, hMainWnd, DebugChannelsDlgProc); } diff --git a/programs/taskmgr/graph.c b/programs/taskmgr/graph.c index bdc60d44284..003ebfe56c8 100644 --- a/programs/taskmgr/graph.c +++ b/programs/taskmgr/graph.c @@ -44,7 +44,8 @@ void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd); void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd); void Graph_DrawMemUsageHistoryGraph(HDC hDC, HWND hWnd); -LRESULT CALLBACK Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK +Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; diff --git a/programs/taskmgr/graphctl.c b/programs/taskmgr/graphctl.c index 9195426cecf..865619b54b9 100644 --- a/programs/taskmgr/graphctl.c +++ b/programs/taskmgr/graphctl.c @@ -532,7 +532,8 @@ extern TGraphCtrl PerformancePageMemUsageHistoryGraph; extern HWND hPerformancePageCpuUsageHistoryGraph; extern HWND hPerformancePageMemUsageHistoryGraph; -LRESULT CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK +GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { RECT rcClient; HDC hdc; diff --git a/programs/taskmgr/graphctl.h b/programs/taskmgr/graphctl.h index 008556aa8b5..5d6e628a8cf 100644 --- a/programs/taskmgr/graphctl.h +++ b/programs/taskmgr/graphctl.h @@ -104,7 +104,7 @@ color); void GraphCtrl_SetRange(TGraphCtrl* this, double dLower, double dUpper, int nDecimalPlaces); -LRESULT CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); #ifdef __cplusplus } diff --git a/programs/taskmgr/perfpage.c b/programs/taskmgr/perfpage.c index 77bbc538a31..4a0ad965173 100644 --- a/programs/taskmgr/perfpage.c +++ b/programs/taskmgr/perfpage.c @@ -115,7 +115,8 @@ static void AdjustCntrlPos(int ctrl_id, HWND hDlg, int nXDifference, int nYDiffe AdjustFrameSize(GetDlgItem(hDlg, ctrl_id), hDlg, nXDifference, nYDifference, 0); } -LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK +PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { RECT rc; int nXDifference; diff --git a/programs/taskmgr/proclist.c b/programs/taskmgr/proclist.c index b3fe4c7df44..c21cdcaef95 100644 --- a/programs/taskmgr/proclist.c +++ b/programs/taskmgr/proclist.c @@ -116,5 +116,5 @@ LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR /* * We pass on all messages except WM_ERASEBKGND */ - return CallWindowProc((WNDPROC)OldProcessListWndProc, hWnd, message, wParam, lParam); + return CallWindowProc(OldProcessListWndProc, hWnd, message, wParam, lParam); } diff --git a/programs/taskmgr/procpage.c b/programs/taskmgr/procpage.c index bb416770aa3..dd6b8e21f73 100644 --- a/programs/taskmgr/procpage.c +++ b/programs/taskmgr/procpage.c @@ -52,7 +52,8 @@ void CommaSeparateNumberString(LPTSTR strNumber, int nMaxCount); void ProcessPageShowContextMenu(DWORD dwProcessId); DWORD WINAPI ProcessPageRefreshThread(void *lpParameter); -LRESULT CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK +ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { RECT rc; int nXDifference; diff --git a/programs/taskmgr/taskmgr.c b/programs/taskmgr/taskmgr.c index 098936e4950..a478d15ccd8 100644 --- a/programs/taskmgr/taskmgr.c +++ b/programs/taskmgr/taskmgr.c @@ -96,7 +96,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, return -1; } - DialogBox(hInst, (LPCTSTR)IDD_TASKMGR_DIALOG, NULL, (DLGPROC)TaskManagerWndProc); + DialogBox(hInst, (LPCTSTR)IDD_TASKMGR_DIALOG, NULL, TaskManagerWndProc); /* Save our settings to the registry */ SaveSettings(); @@ -105,7 +105,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, } /* Message handler for dialog box. */ -LRESULT CALLBACK TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK +TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; @@ -444,13 +445,13 @@ BOOL OnCreate(HWND hWnd) /* Create tab pages */ hTabWnd = GetDlgItem(hWnd, IDC_TAB); #if 1 - hApplicationPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_APPLICATION_PAGE), hWnd, (DLGPROC)ApplicationPageWndProc); - hProcessPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PROCESS_PAGE), hWnd, (DLGPROC)ProcessPageWndProc); - hPerformancePage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PERFORMANCE_PAGE), hWnd, (DLGPROC)PerformancePageWndProc); + hApplicationPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_APPLICATION_PAGE), hWnd, ApplicationPageWndProc); + hProcessPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PROCESS_PAGE), hWnd, ProcessPageWndProc); + hPerformancePage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PERFORMANCE_PAGE), hWnd, PerformancePageWndProc); #else - hApplicationPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_APPLICATION_PAGE), hTabWnd, (DLGPROC)ApplicationPageWndProc); - hProcessPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PROCESS_PAGE), hTabWnd, (DLGPROC)ProcessPageWndProc); - hPerformancePage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PERFORMANCE_PAGE), hTabWnd, (DLGPROC)PerformancePageWndProc); + hApplicationPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_APPLICATION_PAGE), hTabWnd, ApplicationPageWndProc); + hProcessPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PROCESS_PAGE), hTabWnd, ProcessPageWndProc); + hPerformancePage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PERFORMANCE_PAGE), hTabWnd, PerformancePageWndProc); #endif /* Insert tabs */ diff --git a/programs/taskmgr/taskmgr.h b/programs/taskmgr/taskmgr.h index 6cd9181527e..8891d487595 100644 --- a/programs/taskmgr/taskmgr.h +++ b/programs/taskmgr/taskmgr.h @@ -142,7 +142,7 @@ extern HWND hApplicationPageNewTaskButton; /* Application New Task button */ /* Foward declarations of functions included in this code module: */ -LRESULT CALLBACK TaskManagerWndProc(HWND, UINT, WPARAM, LPARAM); +INT_PTR CALLBACK TaskManagerWndProc(HWND, UINT, WPARAM, LPARAM); BOOL OnCreate(HWND hWnd); void OnSize(UINT nType, int cx, int cy); void OnMove(UINT nType, int cx, int cy); @@ -213,11 +213,11 @@ void UpdateApplicationListControlViewSetting(void); void RefreshPerformancePage(void); void RefreshProcessPage(void); -LRESULT CALLBACK ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); -LRESULT CALLBACK Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); -LRESULT CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); -LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); #ifdef __cplusplus }