summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
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)