The IsIconic function determines whether the specified window is minimized (iconic).
函數isiconic返回值取決於指定窗口是否已經最小化。
BOOL IsIconic(
HWND hWnd // handle of window
);
Parameters
hWnd
窗口句柄
Identifies the window.
Return Values
If the window is iconic, the return value is nonzero.
最小化返回非零
If the window is not iconic, the return value is zero.
未最小化,返回0
附delphi代碼小段:
if boolean(IsIconic(iHandle)) then
ShowWindow(iHandle, SW_SHOWNORMAL)
else
begin
ShowMessage('程序已經運行!!');
BringWindowToTop(iHandle);
end;