summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-10 04:59:39 -0500
committerPietro Gagliardi <[email protected]>2014-02-10 04:59:39 -0500
commit6662e09c3064e6c24fb0bc12eca9b7ea716cb328 (patch)
tree9a282e555355d88e6f0f40b90e3f4f7687480393 /common.go
parentef5739229eaae5f5f8c2346d1d6a789f2b79855d (diff)
Added a button to the test main window, including click handling.
Diffstat (limited to 'common.go')
-rw-r--r--common.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/common.go b/common.go
index f4c769e..1996f37 100644
--- a/common.go
+++ b/common.go
@@ -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)