1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-03 08:19:41 +00:00

Duplicate the font handle passed through WM_SETFONT, because it does

not belong to us and is not ours to free.
This commit is contained in:
Mike McCormack 2002-08-13 18:08:15 +00:00 committed by Alexandre Julliard
parent 2f2e4fab6c
commit 06effbf07a

View File

@ -2187,8 +2187,11 @@ static LRESULT
TOOLTIPS_SetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LOGFONTW lf;
infoPtr->hFont = (HFONT)wParam;
if(!GetObjectW((HFONT)wParam, sizeof lf, &lf))
return 0;
infoPtr->hFont = CreateFontIndirectW(&lf);
if ((LOWORD(lParam)) & (infoPtr->nCurrentTool != -1)) {
FIXME("full redraw needed!\n");