From ffa1bbe0b91a8c812ddcea5c5d65e55f60d07f33 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 30 Jun 2014 22:48:12 -0400 Subject: Restored the previous new API. I'm going to change it so that events are callbacks rather than using a window handler, but other than that... yeah. --- stdwndclass_windows.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'stdwndclass_windows.go') diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go index 3fa23c4..ac5dfd9 100644 --- a/stdwndclass_windows.go +++ b/stdwndclass_windows.go @@ -116,7 +116,7 @@ func stdWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESUL switch ss.ctype { case c_button: if wParam.HIWORD() == _BN_CLICKED { - ss.signal() + ss.event() } case c_checkbox: // we opt into doing this ourselves because http://blogs.msdn.com/b/oldnewthing/archive/2014/05/22/10527522.aspx @@ -164,7 +164,11 @@ func stdWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESUL } return 0 case _WM_CLOSE: - s.signal() + close := false // TODO decide apt default + s.close(&close) + if close { + s.hide() + } return 0 default: return defWindowProc(hwnd, uMsg, wParam, lParam) -- cgit v1.2.3