Skip to content

Commit

Permalink
Update user32.go
Browse files Browse the repository at this point in the history
  • Loading branch information
TotallyGamerJet committed May 11, 2020
1 parent 859376c commit 7862776
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions user32.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,9 @@ func GetWindowTextW(hwnd syscall.Handle, str *uint16, maxCount int32) (len int32
return
}

func GetForegroundWindow() (hwnd syscall.Handle, err error) {
r0, _, e1 := syscall.Syscall(procGetForegroundWindow.Addr(), 0, 0, 0, 0)
if e1 != 0 {
err = error(e1)
return
}
hwnd = syscall.Handle(r0)
func GetForegroundWindow() (hwnd HWND) {
ret, _, _ := procGetForegroundWindow.Call()
hwnd = HWND(ret)
return
}

Expand Down

0 comments on commit 7862776

Please sign in to comment.