ホーム › UI.WindowsAndMessaging › IsZoomed
IsZoomed
関数ウィンドウが最大化されているかを判定する。
シグネチャ
// USER32.dll
#include <windows.h>
BOOL IsZoomed(
HWND hWnd
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hWnd | HWND | in |
戻り値の型: BOOL
各言語での呼び出し定義
// USER32.dll
#include <windows.h>
BOOL IsZoomed(
HWND hWnd
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("USER32.dll", ExactSpelling = true)]
static extern bool IsZoomed(
IntPtr hWnd // HWND
);<DllImport("USER32.dll", ExactSpelling:=True)>
Public Shared Function IsZoomed(
hWnd As IntPtr ' HWND
) As Boolean
End Function' hWnd : HWND
Declare PtrSafe Function IsZoomed Lib "user32" ( _
ByVal hWnd As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
IsZoomed = ctypes.windll.user32.IsZoomed
IsZoomed.restype = wintypes.BOOL
IsZoomed.argtypes = [
wintypes.HANDLE, # hWnd : HWND
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('USER32.dll')
IsZoomed = Fiddle::Function.new(
lib['IsZoomed'],
[
Fiddle::TYPE_VOIDP, # hWnd : HWND
],
Fiddle::TYPE_INT)#[link(name = "user32")]
extern "system" {
fn IsZoomed(
hWnd: *mut core::ffi::c_void // HWND
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("USER32.dll")]
public static extern bool IsZoomed(IntPtr hWnd);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_IsZoomed' -Namespace Win32 -PassThru
# $api::IsZoomed(hWnd)#uselib "USER32.dll"
#func global IsZoomed "IsZoomed" sptr
; IsZoomed hWnd ; 戻り値は stat
; hWnd : HWND -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "USER32.dll"
#cfunc global IsZoomed "IsZoomed" sptr
; res = IsZoomed(hWnd)
; hWnd : HWND -> "sptr"; BOOL IsZoomed(HWND hWnd)
#uselib "USER32.dll"
#cfunc global IsZoomed "IsZoomed" intptr
; res = IsZoomed(hWnd)
; hWnd : HWND -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
user32 = windows.NewLazySystemDLL("USER32.dll")
procIsZoomed = user32.NewProc("IsZoomed")
)
// hWnd (HWND)
r1, _, err := procIsZoomed.Call(
uintptr(hWnd),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction IsZoomed(
hWnd: THandle // HWND
): BOOL; stdcall;
external 'USER32.dll' name 'IsZoomed';result := DllCall("USER32\IsZoomed"
, "Ptr", hWnd ; HWND
, "Int") ; return: BOOL●IsZoomed(hWnd) = DLL("USER32.dll", "bool IsZoomed(void*)")
# 呼び出し: IsZoomed(hWnd)
# hWnd : HWND -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。