summaryrefslogtreecommitdiff
path: root/new/button_windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'new/button_windows.c')
-rw-r--r--new/button_windows.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/new/button_windows.c b/new/button_windows.c
index a66490d..d7921ad 100644
--- a/new/button_windows.c
+++ b/new/button_windows.c
@@ -38,6 +38,7 @@ uiControl *uiNewButton(const char *text)
struct button *b;
uiWindowsNewControlParams p;
WCHAR *wtext;
+ HWND hwnd;
b = uiNew(struct button);
@@ -52,9 +53,12 @@ uiControl *uiNewButton(const char *text)
p.data = b;
b->c = uiWindowsNewControl(&p);
+ hwnd = (HWND) uiControlHandle(b->c);
wtext = toUTF16(text);
- // TODO set text
+ if (SetWindowTextW(hwnd, wtext) == 0)
+ logLastError("error setting button text in uiNewButton()");
uiFree(wtext);
+ SendMessageW(hwnd, WM_SETFONT, (WPARAM) hMessageFont, (LPARAM) TRUE);
b->onClicked = defaultOnClicked;