Skip to content

Commit

Permalink
winapi/user32 add api FlashWindow.
Browse files Browse the repository at this point in the history
  • Loading branch information
whtiehack committed Feb 20, 2020
1 parent e907112 commit c0c0aec
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion winapi/user32.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}

0 comments on commit c0c0aec

Please sign in to comment.