add GetForegroundWindow func support

This commit is contained in:
vcaesar 2018-07-30 00:23:35 +08:00
parent b13ad7986e
commit 2a461274b6

View File

@ -14,3 +14,10 @@ func FindWindow(str string) win.HWND {
return hwnd
}
// GetHWND get foreground window hwnd
func GetHWND() win.HWND {
hwnd := win.GetForegroundWindow()
return hwnd
}