H
hnzzq
Unregistered / Unconfirmed
GUEST, unregistred user!
为什么我用下面的过程得不到我想要的窗口位置,下面过程返回的总是<br>我设置的值,如果我不设置r的话,得到的好象是一个随机数。各位大蚜,<br>这是一小问题吧。<br>procedure TForm1.BitBtn1Click(Sender: TObject);<br>var<br> p1,p2:tpoint;<br> r:trect;<br> pos:twindowplacement;<br> s1,s2:string;<br>begin<br>r:=rect(15,23,200,200);<br>pos.length:=sizeof(pos);<br>pos.flags:=WPF_RESTORETOMAXIMIZED;<br> pos.showCmd:=sw_normal;<br> pos.ptMinPosition:=p1;<br> pos.ptMaxPosition:=p2;<br> pos.rcNormalPosition:=r;<br>getwindowplacement(handle,@pos);<br>str(r.Left,s1);<br>str(r.top,s2);<br>//setwindowplacement(handle,@pos);<br>showmessage(s1+' '+s2);<br><br>end;