Skip to content

Commit c0c0aec

Browse files
committed
winapi/user32 add api FlashWindow.
1 parent e907112 commit c0c0aec

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

winapi/user32.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ const (
1818
var libuser32 *windows.LazyDLL
1919
var findWindowEx *windows.LazyProc
2020
var getNextWindow *windows.LazyProc
21+
var flashWindow *windows.LazyProc
2122

2223
func init() {
2324
libuser32 = windows.NewLazySystemDLL("user32.dll")
2425
findWindowEx = libuser32.NewProc("FindWindowExW")
25-
getNextWindow = libuser32.NewProc("GetNextWindow ")
26+
getNextWindow = libuser32.NewProc("GetNextWindow")
27+
flashWindow = libuser32.NewProc("FlashWindow")
2628
}
2729

2830
//FindWindowEx user32 API FindWindowEx
@@ -41,3 +43,8 @@ func GetNextWindow(hWnd win.HWND, wCmd uintptr) win.HWND {
4143
ret, _, _ := getNextWindow.Call(uintptr(hWnd), wCmd)
4244
return win.HWND(ret)
4345
}
46+
47+
func FlashWindow(hWnd win.HWND, bInvert int) int {
48+
ret, _, _ := flashWindow.Call(uintptr(hWnd), uintptr(bInvert))
49+
return int(ret)
50+
}

0 commit comments

Comments
 (0)