summaryrefslogtreecommitdiff
path: root/new/newcontrol_windows.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-04-10 17:53:59 -0400
committerPietro Gagliardi <[email protected]>2015-04-10 17:53:59 -0400
commita788c1b2127b7c9d4eae1cef175f0f43b29b9711 (patch)
tree8e073e1b93a98c4ed247fa1ff1e77da33437e4a6 /new/newcontrol_windows.c
parentf650237614a21e36d9487840233912518480ac75 (diff)
Changed the Windows new control system to automatically assign the standard control font if a flag is set in the creation parameters structure.
Diffstat (limited to 'new/newcontrol_windows.c')
-rw-r--r--new/newcontrol_windows.c5
1 files changed, 4 insertions, 1 deletions
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;
}