Author: weiden
Date: Tue Oct 30 04:51:23 2007
New Revision: 29969
URL:
http://svn.reactos.org/svn/reactos?rev=29969&view=rev
Log:
stock objects don't need to be deleted
Modified:
trunk/reactos/base/applications/taskmgr/graph.c
Modified: trunk/reactos/base/applications/taskmgr/graph.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/graph.c (original)
+++ trunk/reactos/base/applications/taskmgr/graph.c Tue Oct 30 04:51:23 2007
@@ -308,7 +308,7 @@
RECT rcText;
COLORREF crPrevForeground;
TCHAR Text[260];
- HFONT hFont, hOldFont;
+ HFONT hOldFont;
ULONGLONG CommitChargeTotal;
ULONGLONG CommitChargeLimit;
int nBars;
@@ -344,8 +344,7 @@
rcText = rcClient;
InflateRect(&rcText, -2, -2);
crPrevForeground = SetTextColor(hDC, RGB(0, 255, 0));
- hFont = GetStockObject(DEFAULT_GUI_FONT);
- hOldFont = SelectObject(hDC, hFont);
+ hOldFont = SelectObject(hDC, GetStockObject(DEFAULT_GUI_FONT));
DrawText(hDC, Text, -1, &rcText, DT_BOTTOM | DT_CENTER | DT_NOPREFIX |
DT_SINGLELINE);
SelectObject(hDC, hOldFont);
SetTextColor(hDC, crPrevForeground);
@@ -406,7 +405,6 @@
}
SelectObject(hDC, hOldFont);
- DeleteObject(hFont);
}
void Graph_DrawMemUsageHistoryGraph(HDC hDC, HWND hWnd)