diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-11 07:50:00 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-11 07:50:00 -0500 |
| commit | 6ae39f57a299508ed02818dc13a51acec883596a (patch) | |
| tree | 0ee3dc8943056609e14d01810bb66c33e1d3ecf8 | |
| parent | 07f92bb8d939c04ee2777739b05d8bd975ad9e8d (diff) | |
Added window minimum sizes.
| -rw-r--r-- | main.go | 5 | ||||
| -rw-r--r-- | windows.go | 12 |
2 files changed, 17 insertions, 0 deletions
@@ -87,6 +87,11 @@ func wndProc(hwnd HWND, msg uint32, wParam WPARAM, lParam LPARAM) LRESULT { MB_OK) } return 0 + case WM_GETMINMAXINFO: + mm := lParam.MINMAXINFO() + mm.PtMinTrackSize.X = 320 + mm.PtMinTrackSize.Y = 240 + return 0 case WM_CLOSE: err := DestroyWindow(hwnd) if err != nil { @@ -306,3 +306,15 @@ const ( WM_WINDOWPOSCHANGED = 0x0047 WM_WINDOWPOSCHANGING = 0x0046 ) + +type MINMAXINFO struct { + PtReserved POINT + PtMaxSize POINT + PtMaxPosition POINT + PtMinTrackSize POINT + PtMaxTrackSize POINT +} + +func (l LPARAM) MINMAXINFO() *MINMAXINFO { + return (*MINMAXINFO)(unsafe.Pointer(l)) +} |
