private
procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL;procedure TDBGrid.WMVScroll(var Message: TWMVScroll);
begin
inherited;
end;
procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL;procedure TDBGrid.WMVScroll(var Message: TWMVScroll);
begin
inherited;
end;
解决方案 »
- indy9到indy10升级的一个问题Athread.Terminated
- 高分求SeSkin控件!
- 如何编写远程控制软件!应该看那方面的资料或是书。
- 关于TreeView的
- 老话题---托盘程序的消息
- 这两个函数 SetForeGroundWindow, GetForeGroundWindow ;具体怎么用
- project在代码编辑器里面怎么时隐时现的
- 急救!!!~~~~
- 我有listbox1和listbox2,我想选择listbox1中的内容点击按钮就能到listbox2中.
- 我的钱很容易赚的,你只要告诉我,怎么判断我查找出来的文件是个文件夹,那这50分就是你的了!
- 我如何知道着个消息?
- delphi数据类型? 谁能帮我看看,我现在有点糊涂
{$IFDEF WIN32}
WParameter = LongInt;
{$ELSE}
WParameter = Word;
{$ENDIF}
LParameter = LongInt;{Declare a variable to hold the window procedure we are replacing}
var
OldWindowProc : Pointer;function NewWindowProc(WindowHandle : hWnd;
TheMessage : WParameter;
ParamW : WParameter;
ParamL : LParameter) : LongInt
{$IFDEF WIN32} stdcall; {$ELSE} ; export; {$ENDIF}
var
TheRangeMin : integer;
TheRangeMax : integer;
TheRange : integer;
begin if TheMessage = WM_VSCROLL then begin
{Get the min and max range of the horizontal scroll box}
GetScrollRange(WindowHandle,
SB_HORZ,
TheRangeMin,
TheRangeMax);
{Get the vertical scroll box position}
TheRange := GetScrollPos(WindowHandle,
SB_VERT);
{Make sure we wont exceed the range}
if TheRange < TheRangeMin then
TheRange := TheRangeMin else
if TheRange > TheRangeMax then
TheRange := TheRangeMax;
{Set the horizontal scroll bar}
SetScrollPos(WindowHandle,
SB_HORZ,
TheRange,
true);
end; if TheMessage = WM_HSCROLL then begin
{Get the min and max range of the horizontal scroll box}
GetScrollRange(WindowHandle,
SB_VERT,
TheRangeMin,
TheRangeMax);
{Get the horizontal scroll box position}
TheRange := GetScrollPos(WindowHandle,
SB_HORZ);
{Make sure we wont exceed the range}
if TheRange < TheRangeMin then
TheRange := TheRangeMin else
if TheRange > TheRangeMax then
TheRange := TheRangeMax;
{Set the vertical scroll bar}
SetScrollPos(WindowHandle,
SB_VERT,
TheRange,
true);
end;{ Call the old Window procedure to }
{ allow processing of the message. }
NewWindowProc := CallWindowProc(OldWindowProc,
WindowHandle,
TheMessage,
ParamW,
ParamL);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
{ Set the new window procedure for the control }
{ and remember the old window procedure. }
OldWindowProc := Pointer(SetWindowLong(ScrollBox1.Handle,
GWL_WNDPROC,
LongInt(@NewWindowProc)));
end;procedure TForm1.FormDestroy(Sender: TObject);
begin
{ Set the window procedure back }
{ to the old window procedure. }
SetWindowLong(ScrollBox1.Handle,
GWL_WNDPROC,
LongInt(OldWindowProc));end;