diff options
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) |
