Manual scroll rendering

Tech-Archive recommends: Speed Up your PC by fixing your registry



I need to scroll a virtual grid that is 1.2M pixels x 1.28M pixels in size.
I think this is too large of a size for a control or a form, so I think I
need to "fake it" with a custom drawn control.

I do not need to maintain a bitmap or make the control surface physically
larger than the screen, becuase I can create the grid dynamically based upon
any virtual X, Y upper-left coordinate of the currently viewed area. E.g.,
if I am scrolled to X=82503 and Y=53301, I can pain what the grid would
theoretically look like at this position, without having to actually
maintain a grid that is actually that large.

Because I won't be working with a control that is bigger than the
screen/form, I have placed v&h scrollbar controls on my control, and
OnScroll I invalidate the newly scrolled area to trigger OnPaint (modeled
loosely after observing autoscroll's invalidation behavior).

But my problem with the painting is not the new, invalidated area; it's
"shifting" the non-invalidated, already-drawn portion without having to
repaint the whole thing from scratch. I don't know how to do this part - I
think I want to perform a Transform? But it seems rather complex (I don't
really understand the matrix object!)

If I click my vertical scroll bar and the thumb moves 10 pixels "down", in
response to this OnPaint I need to "shift" the currently painted scene up
10px, thus exposing an "invalidated" 10px area at the bottom. I can draw
this new 10px portion just fine, but... how do I perform this "shift" of the
previously painted area? When I used to rely on autoscroll to invalidate
for me, I only had to worry about painting the newly invalidated area and
the "shift" happened automatically (and smoothly) and now without the
benefit of autoscroll I want to reproduce that manually.


.



Relevant Pages

  • Re: Manual scroll rendering
    ... ByVal XAmount As Int32, ByVal YAmount As Int32, ByRef lpRect As RECT, ByRef ... >I need to scroll a virtual grid that is 1.2M pixels x 1.28M pixels in size. ... >I think this is too large of a size for a control or a form, ... > OnScroll I invalidate the newly scrolled area to trigger OnPaint (modeled ...
    (microsoft.public.dotnet.languages.vb)
  • Re: GridCtrl vertical scrollbar problem
    ... It sounds like the control is not paying ... attention to the fact that the scroll bars got turned on. ... I got a wierd problem with GridCtrl scrollbar, I am using a grid ctrl ...
    (microsoft.public.vc.mfc)
  • Re: Huge Grid Component?
    ... who would have the patience to sit and scroll through so many lines and with 100 columns? ... Wouldn't it be better to incorporate filter / search functions to control the scope of this data and thereby minimize the demands required both of the grid and any network loading? ... If the control is smart enough it also can help the user to locate items quickly. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: grid control for access
    ... Does anyone know of a good grid control for displaying a grid of MSAccess ... until you release the scroll button and find out. ... Krzysztof Szyszka, X-Files Software ...
    (alt.comp.lang.borland-delphi)
  • grid control for access
    ... Does anyone know of a good grid control for displaying a grid of MSAccess ... data in Delphi that operates similar to Excel? ... until you release the scroll button and find out. ...
    (alt.comp.lang.borland-delphi)