diff --git a/winapi/user32.go b/winapi/user32.go index b45e89c..a240cdd 100644 --- a/winapi/user32.go +++ b/winapi/user32.go @@ -18,11 +18,13 @@ const ( var libuser32 *windows.LazyDLL var findWindowEx *windows.LazyProc var getNextWindow *windows.LazyProc +var flashWindow *windows.LazyProc func init() { libuser32 = windows.NewLazySystemDLL("user32.dll") findWindowEx = libuser32.NewProc("FindWindowExW") - getNextWindow = libuser32.NewProc("GetNextWindow ") + getNextWindow = libuser32.NewProc("GetNextWindow") + flashWindow = libuser32.NewProc("FlashWindow") } //FindWindowEx user32 API FindWindowEx @@ -41,3 +43,8 @@ func GetNextWindow(hWnd win.HWND, wCmd uintptr) win.HWND { ret, _, _ := getNextWindow.Call(uintptr(hWnd), wCmd) return win.HWND(ret) } + +func FlashWindow(hWnd win.HWND, bInvert int) int { + ret, _, _ := flashWindow.Call(uintptr(hWnd), uintptr(bInvert)) + return int(ret) +}