mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 16:22:58 +00:00
[User32]
- Attempt to fix the font leak when switching applications. Tested with other applications other than Acrobat Reader since it crashes when installing. See bug 5314. svn path=/trunk/; revision=55362
This commit is contained in:
parent
86b5a7c90b
commit
75c818eefb
1 changed files with 3 additions and 1 deletions
|
@ -192,6 +192,7 @@ void OnPaint(HWND hWnd)
|
||||||
int i;
|
int i;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush;
|
||||||
HPEN hPen;
|
HPEN hPen;
|
||||||
|
HFONT dcFont;
|
||||||
COLORREF cr;
|
COLORREF cr;
|
||||||
int nch = GetWindowTextW(windowList[selectedWindow], windowText, 1023);
|
int nch = GetWindowTextW(windowList[selectedWindow], windowText, 1023);
|
||||||
|
|
||||||
|
@ -230,7 +231,7 @@ void OnPaint(HWND hWnd)
|
||||||
DrawIcon(dialogDC, xpos, ypos, hIcon);
|
DrawIcon(dialogDC, xpos, ypos, hIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectObject(dialogDC, dialogFont);
|
dcFont = SelectObject(dialogDC, dialogFont);
|
||||||
SetTextColor(dialogDC, GetSysColor(COLOR_BTNTEXT));
|
SetTextColor(dialogDC, GetSysColor(COLOR_BTNTEXT));
|
||||||
SetBkColor(dialogDC, GetSysColor(COLOR_BTNFACE));
|
SetBkColor(dialogDC, GetSysColor(COLOR_BTNFACE));
|
||||||
|
|
||||||
|
@ -239,6 +240,7 @@ void OnPaint(HWND hWnd)
|
||||||
textRC.right = totalW - 8;
|
textRC.right = totalW - 8;
|
||||||
textRC.bottom = totalH - 8;
|
textRC.bottom = totalH - 8;
|
||||||
DrawTextW(dialogDC, windowText, nch, &textRC, DT_CENTER|DT_END_ELLIPSIS);
|
DrawTextW(dialogDC, windowText, nch, &textRC, DT_CENTER|DT_END_ELLIPSIS);
|
||||||
|
SelectObject(dialogDC, dcFont);
|
||||||
}
|
}
|
||||||
EndPaint(hWnd, &paint);
|
EndPaint(hWnd, &paint);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue