taskmgr: Remove all TCHAR macro usage in miscellaneous UI code.

This commit is contained in:
Andrew Nguyen 2011-05-17 05:15:28 -05:00 committed by Alexandre Julliard
parent 088d0630d9
commit ec24b87adc
3 changed files with 11 additions and 9 deletions

View File

@ -493,9 +493,9 @@ void ProcessPage_OnViewSelectColumns(void)
if (DialogBoxW(hInst, MAKEINTRESOURCEW(IDD_COLUMNS_DIALOG), hMainWnd, ColumnsDialogWndProc) == IDOK) 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++) for (i=0; i<25; i++)

View File

@ -39,6 +39,7 @@ WNDPROC OldProcessListWndProc;
LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{ {
HBRUSH hbrBackground; HBRUSH hbrBackground;
int count;
RECT rcItem; RECT rcItem;
RECT rcClip; RECT rcClip;
HDC hDC; HDC hDC;
@ -69,7 +70,7 @@ LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
/* /*
* Get the background brush * Get the background brush
*/ */
hbrBackground = (HBRUSH) GetClassLongPtr(hWnd, GCLP_HBRBACKGROUND); hbrBackground = (HBRUSH) GetClassLongPtrW(hWnd, GCLP_HBRBACKGROUND);
/* /*
* Calculate the clip rect by getting the RECT * 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. * use icons in this list control.
*/ */
rcClip.left = LVIR_BOUNDS; rcClip.left = LVIR_BOUNDS;
SendMessage(hWnd, LVM_GETITEMRECT, 0, (LPARAM) &rcClip); SendMessageW(hWnd, LVM_GETITEMRECT, 0, (LPARAM) &rcClip);
rcItem.left = LVIR_BOUNDS; 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; rcClip.bottom = rcItem.bottom;
rcItem.left = LVIR_ICON; rcItem.left = LVIR_ICON;
SendMessage(hWnd, LVM_GETITEMRECT, 0, (LPARAM) &rcItem); SendMessageW(hWnd, LVM_GETITEMRECT, 0, (LPARAM) &rcItem);
rcClip.left = rcItem.right; 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 * We pass on all messages except WM_ERASEBKGND
*/ */
return CallWindowProc(OldProcessListWndProc, hWnd, message, wParam, lParam); return CallWindowProcW(OldProcessListWndProc, hWnd, message, wParam, lParam);
} }

View File

@ -64,8 +64,8 @@ static HICON TrayIcon_GetProcessorUsageIcon(void)
/* /*
* Load the bitmaps * Load the bitmaps
*/ */
hBitmap = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_TRAYICON)); hBitmap = LoadBitmapW(hInst, MAKEINTRESOURCEW(IDB_TRAYICON));
hBitmapMask = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_TRAYMASK)); hBitmapMask = LoadBitmapW(hInst, MAKEINTRESOURCEW(IDB_TRAYMASK));
if (!hBitmap || !hBitmapMask) if (!hBitmap || !hBitmapMask)
goto done; goto done;