diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-13 05:28:26 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-13 05:28:26 -0500 |
| commit | 5626b9e35c5824707a905a26f9b074240cd54e7a (patch) | |
| tree | a5f4a22013ad236a65aadf38d3346e6bffd70653 /stdwndclass_windows.go | |
| parent | ae9afced2afe8d4d80ecaf4ff3d09f09d3c9c3df (diff) | |
Added sizing of windows and the main window control. It presently deadlocks; I'll need to redo my mutexes...
Diffstat (limited to 'stdwndclass_windows.go')
| -rw-r--r-- | stdwndclass_windows.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go index b87743f..2824746 100644 --- a/stdwndclass_windows.go +++ b/stdwndclass_windows.go @@ -42,7 +42,20 @@ func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _ = mm return 0 case _WM_SIZE: - // TODO + if s.resize != nil { + var r _RECT + + r1, _, err := _getClientRect.Call( + uintptr(hwnd), + uintptr(unsafe.Pointer(&r))) + if r1 == 0 { + panic("GetClientRect failed: " + err.Error()) + } + err = s.resize(int(r.Left), int(r.Top), int(r.Right), int(r.Bottom)) + if err != nil { + panic("child resize failed: " + err.Error()) + } + } return 0 case _WM_CLOSE: if s.event != nil { |
