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;