diff options
author | Alexander Neumann <alexander.neumann@picos-software.com> | 2019-05-08 16:46:40 +0200 |
---|---|---|
committer | Alexander Neumann <alexander.neumann@picos-software.com> | 2019-05-08 16:46:40 +0200 |
commit | 5d15a47a4bff225b55d3eacd9ac2fbadd9696a20 (patch) | |
tree | f801ef3f72bda94b4781c4168aa39680a25e6e87 | |
parent | Add GetIconInfo (diff) | |
parent | Merge pull request #73 from Amebis/is-iconic (diff) | |
download | wireguard-windows-5d15a47a4bff225b55d3eacd9ac2fbadd9696a20.tar.xz wireguard-windows-5d15a47a4bff225b55d3eacd9ac2fbadd9696a20.zip |
Merge branch 'master' of github.com:lxn/win
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | user32.go | 22 |
2 files changed, 23 insertions, 0 deletions
@@ -26,6 +26,7 @@ Kevin Pors <krpors@gmail.com> ktye <ktye@users.noreply.github.com> mycaosf <mycaosf@gmail.com> ryujimiya <ryujimiya236@gmail.com> +Simon Rozman <simon@rozman.si> Tiago Carvalho <sugoiuguu@tfwno.gf> wsf01 <wf1337@sina.com> gonutz @@ -1684,8 +1684,10 @@ var ( isChild *windows.LazyProc isClipboardFormatAvailable *windows.LazyProc isDialogMessage *windows.LazyProc + isIconic *windows.LazyProc isWindowEnabled *windows.LazyProc isWindowVisible *windows.LazyProc + isZoomed *windows.LazyProc killTimer *windows.LazyProc loadCursor *windows.LazyProc loadIcon *windows.LazyProc @@ -1822,8 +1824,10 @@ func init() { isChild = libuser32.NewProc("IsChild") isClipboardFormatAvailable = libuser32.NewProc("IsClipboardFormatAvailable") isDialogMessage = libuser32.NewProc("IsDialogMessageW") + isIconic = libuser32.NewProc("IsIconic") isWindowEnabled = libuser32.NewProc("IsWindowEnabled") isWindowVisible = libuser32.NewProc("IsWindowVisible") + isZoomed = libuser32.NewProc("IsZoomed") killTimer = libuser32.NewProc("KillTimer") loadCursor = libuser32.NewProc("LoadCursorW") loadIcon = libuser32.NewProc("LoadIconW") @@ -2570,6 +2574,15 @@ func IsDialogMessage(hWnd HWND, msg *MSG) bool { return ret != 0 } +func IsIconic(hWnd HWND) bool { + ret, _, _ := syscall.Syscall(isIconic.Addr(), 1, + uintptr(hWnd), + 0, + 0) + + return ret != 0 +} + func IsWindowEnabled(hWnd HWND) bool { ret, _, _ := syscall.Syscall(isWindowEnabled.Addr(), 1, uintptr(hWnd), @@ -2588,6 +2601,15 @@ func IsWindowVisible(hWnd HWND) bool { return ret != 0 } +func IsZoomed(hWnd HWND) bool { + ret, _, _ := syscall.Syscall(isZoomed.Addr(), 1, + uintptr(hWnd), + 0, + 0) + + return ret != 0 +} + func KillTimer(hWnd HWND, uIDEvent uintptr) bool { ret, _, _ := syscall.Syscall(killTimer.Addr(), 2, uintptr(hWnd), |