mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 23:22:59 +00:00
[EXPLORER] CTrayClockWnd: Fix a leak of font handles. CORE-13155
svn path=/trunk/; revision=74437
This commit is contained in:
parent
3dfa093f63
commit
f23a970e84
1 changed files with 7 additions and 8 deletions
|
@ -714,20 +714,19 @@ public:
|
||||||
0,
|
0,
|
||||||
TMT_TEXTCOLOR,
|
TMT_TEXTCOLOR,
|
||||||
&textColor);
|
&textColor);
|
||||||
|
|
||||||
|
if (this->hFont != NULL)
|
||||||
|
DeleteObject(this->hFont);
|
||||||
|
|
||||||
|
SetFont(hFont, FALSE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NONCLIENTMETRICS ncm = { 0 };
|
/* We don't need to set a font here, our parent will use
|
||||||
ncm.cbSize = sizeof(ncm);
|
* WM_SETFONT to set the right one when themes are not enabled. */
|
||||||
SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, FALSE);
|
|
||||||
|
|
||||||
hFont = CreateFontIndirectW(&ncm.lfMessageFont);
|
|
||||||
|
|
||||||
textColor = RGB(0, 0, 0);
|
textColor = RGB(0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetFont(hFont, FALSE);
|
|
||||||
|
|
||||||
CloseThemeData(clockTheme);
|
CloseThemeData(clockTheme);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue