procedure Register; begin RegisterComponents('Samples', [TSyncStringGrid]); end;
procedure TSyncStringGrid.WMVScroll(var Msg: TMessage); begin
if not FInSync and Assigned(FSyncGrid) and (FSyncKind in [skBoth, skVScroll]) then FSyncGrid.DoSync(WM_VSCROLL, Msg.wParam, Msg.lParam); inherited; end;
procedure TSyncStringGrid.WMHScroll(var Msg: TMessage); begin
if not FInSync and Assigned(FSyncGrid) and (FSyncKind in [skBoth, skHScroll]) then FSyncGrid.DoSync(WM_HSCROLL, Msg.wParam, Msg.lParam); inherited; end;
procedure TForm1.Grid1WindowProc(var Message: TMessage); begin OldGridProc1(Message); if ((Message.Msg = WM_VSCROLL) or (Message.Msg = WM_HSCROLL) or
Message.msg = WM_Mousewheel)) then
begin OldGridProc2(Message); end; end;
procedure TForm1.Grid2WindowProc(var Message: TMessage); begin OldGridProc2(Message); if ((Message.Msg = WM_VSCROLL) or (Message.Msg = WM_HSCROLL) or (Message.msg = WM_Mousewheel)) then
begin OldGridProc1(Message); end; end;