Added button events.
This commit is contained in:
parent
ddfb5c7603
commit
5f587fbf47
|
@ -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()")
|
||||
|
|
Loading…
Reference in New Issue