调用GetScrollRange时的几个参数如何写?(50分)

  • 主题发起人 主题发起人 coolqiang
  • 开始时间 开始时间
C

coolqiang

Unregistered / Unconfirmed
GUEST, unregistred user!
GetScrollRange的后面两个参数如何使用,要怎样定义变量?请写出变量定义和调用的代码。<br><br>BOOL GetScrollRange(<br>&nbsp; &nbsp; HWND hWnd, // handle of window with scroll bar<br>&nbsp; &nbsp; int nBar, // scroll bar flags<br>&nbsp; &nbsp; LPINT lpMinPos,// address of variable that receives minimum position<br>&nbsp; &nbsp; LPINT lpMaxPos // address of variable that receives maximum position<br>); <br>
 
procedure TForm1.Button1Click(Sender: TObject);<br>Var i,j: longint ;<br>begin<br>&nbsp; &nbsp;GetScrollRange(form1.handle,SB_HORZ,i,j); //得到窗口水平滚动条的最小、大。<br>&nbsp; &nbsp;label1.caption := inttostr(i) + ' &nbsp; ' + inttostr(j);<br>&nbsp; &nbsp;GetScrollRange(form1.handle,SB_VERT,i,j); //得到窗口垂直滚动条的最小、大。<br>&nbsp; &nbsp;label2.caption := inttostr(i) + ' &nbsp; ' + inttostr(j);<br>&nbsp; &nbsp;GetScrollRange(ScrollBar1.handle,SB_CTL,i,j); //得到某个滚动条的最小、大。<br>&nbsp; &nbsp;label3.caption := inttostr(i) + ' &nbsp; ' + inttostr(j);<br>end;<br>
 
接受答案了.
 
后退
顶部