stock objects don't need to be deleted

svn path=/trunk/; revision=29969
This commit is contained in:
Thomas Bluemel 2007-10-30 01:51:23 +00:00
parent b9ef3cb742
commit 935014319a

View file

@ -308,7 +308,7 @@ void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
RECT rcText;
COLORREF crPrevForeground;
TCHAR Text[260];
HFONT hFont, hOldFont;
HFONT hOldFont;
ULONGLONG CommitChargeTotal;
ULONGLONG CommitChargeLimit;
int nBars;
@ -344,8 +344,7 @@ 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);
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 @@ void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
}
SelectObject(hDC, hOldFont);
DeleteObject(hFont);
}
void Graph_DrawMemUsageHistoryGraph(HDC hDC, HWND hWnd)