From c6b03c24b9ed5490ac42b4ffc5ae17b179cb3172 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Fri, 27 Jul 2007 13:47:28 +0000 Subject: [PATCH] set the text in the mem and cpu graphs to use the default GUI font. This cleans up the appearance svn path=/trunk/; revision=27931 --- reactos/base/applications/taskmgr/graph.c | 8 ++++++++ reactos/base/applications/taskmgr/lang/en-US.rc | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/reactos/base/applications/taskmgr/graph.c b/reactos/base/applications/taskmgr/graph.c index 6ab48d5ce49..5d3ed5bb2db 100644 --- a/reactos/base/applications/taskmgr/graph.c +++ b/reactos/base/applications/taskmgr/graph.c @@ -137,6 +137,7 @@ void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd) RECT rcText; COLORREF crPrevForeground; TCHAR Text[260]; + HFONT hFont, hOldFont; ULONG CpuUsage; ULONG CpuKernelUsage; int nBars; @@ -173,7 +174,10 @@ void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd) rcText = rcClient; InflateRect(&rcText, -2, -2); crPrevForeground = SetTextColor(hDC, RGB(0, 255, 0)); + hFont = GetStockObject(DEFAULT_GUI_FONT); + hOldFont = SelectObject(hDC, hFont); DrawText(hDC, Text, -1, &rcText, DT_BOTTOM | DT_CENTER | DT_NOPREFIX | DT_SINGLELINE); + SelectObject(hDC, hOldFont); SetTextColor(hDC, crPrevForeground); /* @@ -303,6 +307,7 @@ void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd) RECT rcText; COLORREF crPrevForeground; TCHAR Text[260]; + HFONT hFont, hOldFont; ULONGLONG CommitChargeTotal; ULONGLONG CommitChargeLimit; int nBars; @@ -338,7 +343,10 @@ void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd) rcText = rcClient; InflateRect(&rcText, -2, -2); crPrevForeground = SetTextColor(hDC, RGB(0, 255, 0)); + hFont = GetStockObject(DEFAULT_GUI_FONT); + hOldFont = SelectObject(hDC, hFont); DrawText(hDC, Text, -1, &rcText, DT_BOTTOM | DT_CENTER | DT_NOPREFIX | DT_SINGLELINE); + SelectObject(hDC, hOldFont); SetTextColor(hDC, crPrevForeground); /* diff --git a/reactos/base/applications/taskmgr/lang/en-US.rc b/reactos/base/applications/taskmgr/lang/en-US.rc index d15d546119e..8305da74230 100644 --- a/reactos/base/applications/taskmgr/lang/en-US.rc +++ b/reactos/base/applications/taskmgr/lang/en-US.rc @@ -179,7 +179,7 @@ IDD_TASKMGR_DIALOG DIALOG DISCARDABLE 0, 0, 264, 246 STYLE DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION "Task Manager" +CAPTION "ReactOS Task Manager" MENU IDR_TASKMANAGER FONT 8, "MS Shell Dlg" BEGIN