Migrated controlsize_windows.go and stdwndclass_windows.go to the new API.

This commit is contained in:
Pietro Gagliardi 2014-06-28 07:25:42 -04:00
parent 2e7f3d299e
commit 9134189f52
2 changed files with 6 additions and 3 deletions

View File

@ -175,7 +175,6 @@ func releaseTextDC(hwnd _HWND, dc _HANDLE) {
}
}
// This function runs on uitask; call the functions directly.
func (s *sysData) preferredSize(d *sysSizeData) (width int, height int) {
// the preferred size of an Area is its size
if stdDlgSizes[s.ctype].area {

View File

@ -116,7 +116,7 @@ func stdWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESUL
switch ss.ctype {
case c_button:
if wParam.HIWORD() == _BN_CLICKED {
ss.signal()
ss.event()
}
case c_checkbox:
// we opt into doing this ourselves because http://blogs.msdn.com/b/oldnewthing/archive/2014/05/22/10527522.aspx
@ -164,7 +164,11 @@ func stdWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESUL
}
return 0
case _WM_CLOSE:
s.signal()
close := false // TODO decide apt default
s.close(&close)
if close {
s.hide()
}
return 0
default:
return defWindowProc(hwnd, uMsg, wParam, lParam)