From 8305ad50ea413828dd2b4b56e413875885ee1e46 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 24 Jan 1999 19:09:24 +0000 Subject: [PATCH] Added WM_[G/S]ETFONT handling. --- dlls/comctl32/progress.c | 30 ++++++++++++++++++++++-------- include/progress.h | 1 + 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index c7049680521..3a99d3fa6e5 100644 --- a/dlls/comctl32/progress.c +++ b/dlls/comctl32/progress.c @@ -3,8 +3,6 @@ * * Copyright 1997 Dimitrie O. Paun * - * TODO: - * - I do not know what to to on WM_[SG]ET_FONT */ #include "windows.h" @@ -165,6 +163,24 @@ static void PROGRESS_CoercePos(WND *wndPtr) infoPtr->CurVal = infoPtr->MaxVal; } + +/*********************************************************************** + * PROGRESS_SetFont + * Set new Font for progress bar + */ +static HFONT32 +PROGRESS_SetFont (WND *wndPtr, WPARAM32 wParam, LPARAM lParam) +{ + PROGRESS_INFO *infoPtr = PROGRESS_GetInfoPtr(wndPtr); + HFONT32 hOldFont = infoPtr->hFont; + + infoPtr->hFont = (HFONT32)wParam; + if (LOWORD(lParam)) + PROGRESS_Refresh (wndPtr); + return hOldFont; +} + + /*********************************************************************** * ProgressWindowProc */ @@ -194,6 +210,7 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message, infoPtr->Step=10; infoPtr->ColorBar=CLR_DEFAULT; infoPtr->ColorBk=CLR_DEFAULT; + infoPtr->hFont=(HANDLE32)NULL; TRACE(progress, "Progress Ctrl creation, hwnd=%04x\n", hwnd); break; @@ -208,14 +225,11 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message, return 1; case WM_GETFONT: - FIXME (progress, "WM_GETFONT - empty message!\n"); - /* FIXME: What do we need to do? */ - break; + return (LRESULT)infoPtr->hFont; case WM_SETFONT: - FIXME (progress, "WM_SETFONT - empty message!\n"); - /* FIXME: What do we need to do? */ - break; + return PROGRESS_SetFont (wndPtr, wParam, lParam); +/* break; */ case WM_PAINT: PROGRESS_Paint (wndPtr); diff --git a/include/progress.h b/include/progress.h index b7fe1534a69..e26981004ea 100644 --- a/include/progress.h +++ b/include/progress.h @@ -18,6 +18,7 @@ typedef struct INT32 Step; /* Step to use on PMB_STEPIT */ COLORREF ColorBar; /* Bar color */ COLORREF ColorBk; /* Background color */ + HFONT32 hFont; /* Handle to font (not unused) */ } PROGRESS_INFO; -- 2.11.4.GIT