Commit 8305ad50 authored by Eric Kohl's avatar Eric Kohl Committed by Alexandre Julliard

Added WM_[G/S]ETFONT handling.

parent 19ba7199
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
* *
* Copyright 1997 Dimitrie O. Paun * Copyright 1997 Dimitrie O. Paun
* *
* TODO:
* - I do not know what to to on WM_[SG]ET_FONT
*/ */
#include "windows.h" #include "windows.h"
...@@ -165,6 +163,24 @@ static void PROGRESS_CoercePos(WND *wndPtr) ...@@ -165,6 +163,24 @@ static void PROGRESS_CoercePos(WND *wndPtr)
infoPtr->CurVal = infoPtr->MaxVal; 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 * ProgressWindowProc
*/ */
...@@ -194,6 +210,7 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message, ...@@ -194,6 +210,7 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
infoPtr->Step=10; infoPtr->Step=10;
infoPtr->ColorBar=CLR_DEFAULT; infoPtr->ColorBar=CLR_DEFAULT;
infoPtr->ColorBk=CLR_DEFAULT; infoPtr->ColorBk=CLR_DEFAULT;
infoPtr->hFont=(HANDLE32)NULL;
TRACE(progress, "Progress Ctrl creation, hwnd=%04x\n", hwnd); TRACE(progress, "Progress Ctrl creation, hwnd=%04x\n", hwnd);
break; break;
...@@ -208,14 +225,11 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message, ...@@ -208,14 +225,11 @@ LRESULT WINAPI ProgressWindowProc(HWND32 hwnd, UINT32 message,
return 1; return 1;
case WM_GETFONT: case WM_GETFONT:
FIXME (progress, "WM_GETFONT - empty message!\n"); return (LRESULT)infoPtr->hFont;
/* FIXME: What do we need to do? */
break;
case WM_SETFONT: case WM_SETFONT:
FIXME (progress, "WM_SETFONT - empty message!\n"); return PROGRESS_SetFont (wndPtr, wParam, lParam);
/* FIXME: What do we need to do? */ /* break; */
break;
case WM_PAINT: case WM_PAINT:
PROGRESS_Paint (wndPtr); PROGRESS_Paint (wndPtr);
......
...@@ -18,6 +18,7 @@ typedef struct ...@@ -18,6 +18,7 @@ typedef struct
INT32 Step; /* Step to use on PMB_STEPIT */ INT32 Step; /* Step to use on PMB_STEPIT */
COLORREF ColorBar; /* Bar color */ COLORREF ColorBar; /* Bar color */
COLORREF ColorBk; /* Background color */ COLORREF ColorBk; /* Background color */
HFONT32 hFont; /* Handle to font (not unused) */
} PROGRESS_INFO; } PROGRESS_INFO;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment