From a9325fbfbc77319e453366258274bd5cbddfbcd2 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 24 Feb 2014 14:17:37 -0500 Subject: [PATCH] Some notes on the last few changes. --- prefsize_windows.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prefsize_windows.go b/prefsize_windows.go index 9598cb0..a6e7bbf 100644 --- a/prefsize_windows.go +++ b/prefsize_windows.go @@ -60,11 +60,13 @@ var ( _releaseDC = user32.NewProc("ReleaseDC") ) +// This function runs on uitask; call the functions directly. func (s *sysData) preferredSize() (width int, height int) { var dc _HANDLE var tm _TEXTMETRICS var baseX, baseY int + // TODO use GetDC() and not GetWindowDC()? r1, _, err := _getWindowDC.Call(uintptr(s.hwnd)) if r1 == 0 { // failure panic(err) // TODO return it instead