From a788c1b2127b7c9d4eae1cef175f0f43b29b9711 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 10 Apr 2015 17:53:59 -0400 Subject: Changed the Windows new control system to automatically assign the standard control font if a flag is set in the creation parameters structure. --- new/newcontrol_windows.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'new/newcontrol_windows.c') diff --git a/new/newcontrol_windows.c b/new/newcontrol_windows.c index 0122db7..5ca9ad1 100644 --- a/new/newcontrol_windows.c +++ b/new/newcontrol_windows.c @@ -105,16 +105,19 @@ uiControl *uiWindowsNewControl(uiWindowsNewControlParams *p) s->onWM_DESTROY = p->onWM_DESTROY; c = uiNew(uiControl); - c->internal = s; c->destroy = singleDestroy; c->handle = singleHandle; c->setParent = singleSetParent; c->removeParent = singleRemoveParent; c->resize = singleResize; + if (p->useStandardControlFont) + SendMessageW(s->hwnd, WM_SETFONT, (WPARAM) hMessageFont, (LPARAM) TRUE); + if ((*fv_SetWindowSubclass)(s->hwnd, singleSubclassProc, 0, (DWORD_PTR) c) == FALSE) logLastError("error subclassing Windows control in uiWindowsNewControl()"); + c->internal = s; return c; } -- cgit v1.2.3