diff options
| -rw-r--r-- | stdwndclass_windows.go | 11 | ||||
| -rw-r--r-- | sysdata.go | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go index fae357a..e4974d1 100644 --- a/stdwndclass_windows.go +++ b/stdwndclass_windows.go @@ -22,9 +22,14 @@ func stdWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESUL } switch uMsg { case _WM_COMMAND: - id := wParam.LOWORD() - // ... member events - _ = id + id := _HMENU(wParam.LOWORD()) + sysData = getSysDataID(id) + switch sysData.ctype { + case c_button: + if wParam.HIWORD() == _BN_CLICKED { + sysData.clicked <- struct{}{} + } + } return 0 case _WM_GETMINMAXINFO: mm := lParam.MINMAXINFO() @@ -12,6 +12,9 @@ type cSysData struct { // for Window closing chan struct{} + + // for Button + clicked chan struct{} } func (c *cSysData) make(initText string, initWidth int, initHeight int) error { panic(runtime.GOOS + " sysData does not define make()") |
