Some notes on the last few changes.

This commit is contained in:
Pietro Gagliardi 2014-02-24 14:17:37 -05:00
parent b166c0f114
commit a9325fbfbc
1 changed files with 2 additions and 0 deletions

View File

@ -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