From ec24b87adceb6ecbceb386c978a159bdfe6595f5 Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Tue, 17 May 2011 05:15:28 -0500 Subject: [PATCH] taskmgr: Remove all TCHAR macro usage in miscellaneous UI code. --- programs/taskmgr/column.c | 4 ++-- programs/taskmgr/proclist.c | 12 +++++++----- programs/taskmgr/trayicon.c | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/programs/taskmgr/column.c b/programs/taskmgr/column.c index 688771dc882..aaa604620c9 100644 --- a/programs/taskmgr/column.c +++ b/programs/taskmgr/column.c @@ -493,9 +493,9 @@ void ProcessPage_OnViewSelectColumns(void) if (DialogBoxW(hInst, MAKEINTRESOURCEW(IDD_COLUMNS_DIALOG), hMainWnd, ColumnsDialogWndProc) == IDOK) { - for (i=Header_GetItemCount(hProcessPageHeaderCtrl)-1; i>=0; i--) + for (i=SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0)-1; i>=0; i--) { - ListView_DeleteColumn(hProcessPageListCtrl, i); + SendMessageW(hProcessPageListCtrl, LVM_DELETECOLUMN, 0, i); } for (i=0; i<25; i++) diff --git a/programs/taskmgr/proclist.c b/programs/taskmgr/proclist.c index 07151c04de9..9bb26a77446 100644 --- a/programs/taskmgr/proclist.c +++ b/programs/taskmgr/proclist.c @@ -39,6 +39,7 @@ WNDPROC OldProcessListWndProc; LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { HBRUSH hbrBackground; + int count; RECT rcItem; RECT rcClip; HDC hDC; @@ -69,7 +70,7 @@ LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR /* * Get the background brush */ - hbrBackground = (HBRUSH) GetClassLongPtr(hWnd, GCLP_HBRBACKGROUND); + hbrBackground = (HBRUSH) GetClassLongPtrW(hWnd, GCLP_HBRBACKGROUND); /* * Calculate the clip rect by getting the RECT @@ -80,13 +81,14 @@ LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR * use icons in this list control. */ rcClip.left = LVIR_BOUNDS; - SendMessage(hWnd, LVM_GETITEMRECT, 0, (LPARAM) &rcClip); + SendMessageW(hWnd, LVM_GETITEMRECT, 0, (LPARAM) &rcClip); rcItem.left = LVIR_BOUNDS; - SendMessage(hWnd, LVM_GETITEMRECT, ListView_GetItemCount(hWnd) - 1, (LPARAM) &rcItem); + count = SendMessageW(hWnd, LVM_GETITEMCOUNT, 0, 0); + SendMessageW(hWnd, LVM_GETITEMRECT, count - 1, (LPARAM) &rcItem); rcClip.bottom = rcItem.bottom; rcItem.left = LVIR_ICON; - SendMessage(hWnd, LVM_GETITEMRECT, 0, (LPARAM) &rcItem); + SendMessageW(hWnd, LVM_GETITEMRECT, 0, (LPARAM) &rcItem); rcClip.left = rcItem.right; /* @@ -117,5 +119,5 @@ LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR /* * We pass on all messages except WM_ERASEBKGND */ - return CallWindowProc(OldProcessListWndProc, hWnd, message, wParam, lParam); + return CallWindowProcW(OldProcessListWndProc, hWnd, message, wParam, lParam); } diff --git a/programs/taskmgr/trayicon.c b/programs/taskmgr/trayicon.c index b1379f531a2..8ef9ed45d30 100644 --- a/programs/taskmgr/trayicon.c +++ b/programs/taskmgr/trayicon.c @@ -64,8 +64,8 @@ static HICON TrayIcon_GetProcessorUsageIcon(void) /* * Load the bitmaps */ - hBitmap = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_TRAYICON)); - hBitmapMask = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_TRAYMASK)); + hBitmap = LoadBitmapW(hInst, MAKEINTRESOURCEW(IDB_TRAYICON)); + hBitmapMask = LoadBitmapW(hInst, MAKEINTRESOURCEW(IDB_TRAYMASK)); if (!hBitmap || !hBitmapMask) goto done;