diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-28 07:25:42 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-28 07:25:42 -0400 |
| commit | 9134189f5216527188441fcc1376568575d78a77 (patch) | |
| tree | 16bc68c17ef4f7773176b0934651f8e9632f3cdc | |
| parent | 2e7f3d299ece8588180450d95ac6962e7e278cce (diff) | |
Migrated controlsize_windows.go and stdwndclass_windows.go to the new API.
| -rw-r--r-- | controlsize_windows.go | 1 | ||||
| -rw-r--r-- | stdwndclass_windows.go | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/controlsize_windows.go b/controlsize_windows.go index d43599c..0afd209 100644 --- a/controlsize_windows.go +++ b/controlsize_windows.go @@ -175,7 +175,6 @@ func releaseTextDC(hwnd _HWND, dc _HANDLE) { } } -// This function runs on uitask; call the functions directly. func (s *sysData) preferredSize(d *sysSizeData) (width int, height int) { // the preferred size of an Area is its size if stdDlgSizes[s.ctype].area { 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) |
