diff options
author | Simon Rozman <simon@rozman.si> | 2019-09-09 12:49:27 +0200 |
---|---|---|
committer | Simon Rozman <simon@rozman.si> | 2019-09-09 12:49:27 +0200 |
commit | fdaad66018acd7c4b0d94d9d9fab70f1f42edb5a (patch) | |
tree | 42813a458f6ea18c1ab91f29a3e77a639bb56b5c | |
parent | Add various user32 constants (diff) | |
download | wireguard-windows-fdaad66018acd7c4b0d94d9d9fab70f1f42edb5a.tar.xz wireguard-windows-fdaad66018acd7c4b0d94d9d9fab70f1f42edb5a.zip |
Add NotifyWinEvent
Signed-off-by: Simon Rozman <simon@rozman.si>
-rw-r--r-- | user32.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1841,6 +1841,7 @@ var ( messageBox *windows.LazyProc monitorFromWindow *windows.LazyProc moveWindow *windows.LazyProc + notifyWinEvent *windows.LazyProc unregisterClass *windows.LazyProc openClipboard *windows.LazyProc peekMessage *windows.LazyProc @@ -1985,6 +1986,7 @@ func init() { messageBox = libuser32.NewProc("MessageBoxW") monitorFromWindow = libuser32.NewProc("MonitorFromWindow") moveWindow = libuser32.NewProc("MoveWindow") + notifyWinEvent = libuser32.NewProc("NotifyWinEvent") unregisterClass = libuser32.NewProc("UnregisterClassW") openClipboard = libuser32.NewProc("OpenClipboard") peekMessage = libuser32.NewProc("PeekMessageW") @@ -2902,6 +2904,16 @@ func MoveWindow(hWnd HWND, x, y, width, height int32, repaint bool) bool { return ret != 0 } +func NotifyWinEvent(event uint32, hwnd HWND, idObject, idChild int32) { + syscall.Syscall6(notifyWinEvent.Addr(), 4, + uintptr(event), + uintptr(hwnd), + uintptr(idObject), + uintptr(idChild), + 0, + 0) +} + func UnregisterClass(name *uint16) bool { ret, _, _ := syscall.Syscall(unregisterClass.Addr(), 1, uintptr(unsafe.Pointer(name)), |