diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-12 11:29:20 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-12 11:29:20 -0500 |
| commit | ddfb5c760345b03c16c1559bd3e83cbafb8b11c3 (patch) | |
| tree | e182dc1bcdf4f1e2eae7dd333aa27195087f9230 /sysdata_windows.go | |
| parent | 87a99bd675d6bbfedc1e4446c6fd25ee5f55f3a4 (diff) | |
Added buttons.
Diffstat (limited to 'sysdata_windows.go')
| -rw-r--r-- | sysdata_windows.go | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go index 554ae19..586b320 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -23,8 +23,8 @@ type classData struct { mkid bool } -//const controlstyle = _WS_CHILD | _WS_VISIBLE | _WS_TABSTOP -//const controlxstyle = 0 +const controlstyle = _WS_CHILD | _WS_VISIBLE | _WS_TABSTOP +const controlxstyle = 0 var classTypes = [nctypes]*classData{ c_window: &classData{ @@ -32,12 +32,12 @@ var classTypes = [nctypes]*classData{ style: _WS_OVERLAPPEDWINDOW, xstyle: 0, }, -// c_button: &classData{ -// name: "BUTTON" -// style: _BS_PUSHBUTTON | controlstyle, -// xstyle: 0 | controlxstyle, -// mkid: true, -// }, + c_button: &classData{ + name: "BUTTON", + style: _BS_PUSHBUTTON | controlstyle, + xstyle: 0 | controlxstyle, + mkid: true, + }, } var ( @@ -56,8 +56,10 @@ func (s *sysData) make(initText string, initWidth int, initHeight int) (err erro ret := make(chan uiret) defer close(ret) ct := classTypes[s.ctype] + pwin := uintptr(_NULL) if ct.mkid { s.cid = nextID() + pwin = uintptr(s.parentWindow.hwnd) } uitask <- &uimsg{ call: _createWindowEx, @@ -70,7 +72,7 @@ func (s *sysData) make(initText string, initWidth int, initHeight int) (err erro uintptr(_CW_USEDEFAULT), uintptr(initWidth), uintptr(initHeight), - uintptr(_NULL), // TODO parent + pwin, uintptr(s.cid), uintptr(hInstance), uintptr(_NULL), |
