W
Workgroups
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.
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.