我用VC6测试的结果与Delphi6一样,SW_HIDE的结果就是1<br>另外,MSDN中的说明:<br>The flags member of WINDOWPLACEMENT retrieved by this function is always zero. <br>If the window identified by the hWnd parameter is maximized, <br>the showCmd member is SW_SHOWMAXIMIZED. <br>If the window is minimized, showCmd is SW_SHOWMINIMIZED. <br>Otherwise, it is SW_SHOWNORMAL.<br>是不是就是说,如果Handle不是最大化以及最小化的时候,showCmd只会是SW_SHOWNORMAL(1)?<br>大概就是这样,反正我用下面的程序测试,显示的结果只有1、2、3:<br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> wp: TWindowPlacement;<br> i: Integer;<br>begin<br> for i:= 0 to 11 do<br> begin<br> ShowWindow(Handle, i);<br> FillChar(wp, SizeOf(wp), 0);<br> wp.length := SizeOf(wp);<br> if GetWindowPlacement(Handle, @wp) then<br> begin<br> ShowMessage(IntToStr(wp.showCmd));<br> end<br> else<br> ShowMessage(SysErrorMessage(GetLastError));<br> end;<br>end;<br><br>