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 {
|
switch uMsg {
|
||||||
case _WM_COMMAND:
|
case _WM_COMMAND:
|
||||||
id := wParam.LOWORD()
|
id := _HMENU(wParam.LOWORD())
|
||||||
// ... member events
|
sysData = getSysDataID(id)
|
||||||
_ = id
|
switch sysData.ctype {
|
||||||
|
case c_button:
|
||||||
|
if wParam.HIWORD() == _BN_CLICKED {
|
||||||
|
sysData.clicked <- struct{}{}
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0
|
return 0
|
||||||
case _WM_GETMINMAXINFO:
|
case _WM_GETMINMAXINFO:
|
||||||
mm := lParam.MINMAXINFO()
|
mm := lParam.MINMAXINFO()
|
||||||
|
|
|
@ -12,6 +12,9 @@ type cSysData struct {
|
||||||
|
|
||||||
// for Window
|
// for Window
|
||||||
closing chan struct{}
|
closing chan struct{}
|
||||||
|
|
||||||
|
// for Button
|
||||||
|
clicked chan struct{}
|
||||||
}
|
}
|
||||||
func (c *cSysData) make(initText string, initWidth int, initHeight int) error {
|
func (c *cSysData) make(initText string, initWidth int, initHeight int) error {
|
||||||
panic(runtime.GOOS + " sysData does not define make()")
|
panic(runtime.GOOS + " sysData does not define make()")
|
||||||
|
|
Loading…
Reference in New Issue