diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-10 04:59:39 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-10 04:59:39 -0500 |
| commit | 6662e09c3064e6c24fb0bc12eca9b7ea716cb328 (patch) | |
| tree | 9a282e555355d88e6f0f40b90e3f4f7687480393 /common.go | |
| parent | ef5739229eaae5f5f8c2346d1d6a789f2b79855d (diff) | |
Added a button to the test main window, including click handling.
Diffstat (limited to 'common.go')
| -rw-r--r-- | common.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -13,6 +13,7 @@ var ( type HANDLE uintptr type HWND HANDLE type HBRUSH HANDLE +type HMENU HANDLE const ( NULL = 0 @@ -25,6 +26,16 @@ type WPARAM uintptr type LPARAM uintptr type LRESULT uintptr +func (w WPARAM) LOWORD() uint16 { + // according to windef.h + return uint16(w & 0xFFFF) +} + +func (w WPARAM) HIWORD() uint16 { + // according to windef.h + return uint16((w >> 16) & 0xFFFF) +} + // microsoft's header files do this func MAKEINTRESOURCE(what uint16) uintptr { return uintptr(what) |
