--- a/ui/win32/button.c Wed Nov 26 19:39:37 2025 +0100 +++ b/ui/win32/button.c Thu Nov 27 15:15:09 2025 +0100 @@ -100,11 +100,11 @@ return size; } -void ui_button_eventproc(W32Widget *widget, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { +int ui_button_eventproc(W32Widget *widget, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { UiWidget *w = (UiWidget*)widget; if (uMsg != WM_COMMAND) { - return; + return 0; } UiEvent e; @@ -119,6 +119,8 @@ if (w->callback) { w->callback(&e, w->callbackdata); } + + return 0; } static UIWIDGET create_togglebutton(UiObject *obj, UiToggleArgs *args, unsigned long type) { @@ -187,9 +189,9 @@ i->value = v; } -void ui_togglebutton_eventproc(W32Widget *widget, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { +int ui_togglebutton_eventproc(W32Widget *widget, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (uMsg != WM_COMMAND) { - return; + return 0; } UiWidget *w = (UiWidget*)widget; @@ -205,6 +207,8 @@ if (w->callback) { w->callback(&e, w->callbackdata); } + + return 0; } @@ -256,15 +260,15 @@ return widget; } -void ui_radiobutton_eventproc(W32Widget *widget, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { +int ui_radiobutton_eventproc(W32Widget *widget, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (uMsg != WM_COMMAND) { - return; + return 0; } UiWidget *w = (UiWidget*)widget; int checked = SendMessage(w->widget.hwnd, BM_GETCHECK, 0, 0); if (!checked) { - return; // ignore uncheck events + return 0; // ignore uncheck events } int b = 0; @@ -296,6 +300,8 @@ if (w->callback) { w->callback(&e, w->callbackdata); } + + return 0; } int64_t ui_radiobutton_get(UiInteger *i) {