From a94d154e1b9b130a225e76ed1d5fd92b6125b720 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 29 Mar 2014 18:51:22 -0400 Subject: Implemented Area.SetSize() on Windows. --- sysdata_windows.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'sysdata_windows.go') diff --git a/sysdata_windows.go b/sysdata_windows.go index 6782300..5d7acf0 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -17,6 +17,9 @@ type sysData struct { nextChildID _HMENU childrenLock sync.Mutex isMarquee bool // for sysData.setProgress() + // unlike with GTK+ and Mac OS X, we're responsible for sizing Area properly ourselves + areawidth int + areaheight int } type classData struct { @@ -623,5 +626,17 @@ func (s *sysData) len() int { } func (s *sysData) setAreaSize(width int, height int) { - // TODO + ret := make(chan uiret) + defer close(ret) + uitask <- &uimsg{ + call: _sendMessage, + p: []uintptr{ + uintptr(s.hwnd), + uintptr(msgSetAreaSize), + uintptr(width), // WPARAM is UINT_PTR on Windows XP and newer at least, so we're good with this + uintptr(height), + }, + ret: ret, + } + <-ret } -- cgit v1.2.3