A
--== Alain ==--
Hi,
I have a question about drawing windowed control.
For example, i have a windowed control, let's called it C1 (as container
for example).
its width = 300 px and height = 200 px.
C1 displays some other windowed controls, however, not all are displayed
initially when C1 is painted. for example C2 can be located on point
500,300 (x,y).
therefore, C2 is not displayed initially,
I have 4 buttons which allow me to scroll from right to left or bottom
to top the "canvas" (display surface) of C1.
However, i would like to understand how i can shift this canvas based on
button click ?
I mean if i click on "Right Button" 10 times, the drawing region of C1
should be re-draw to reflect this shift. So, C1 should be repaint to
display the region : 10,0,300,200 (x,y,width,height).
I suppose that i have to use the paint event with clip, cliprectangle
and bound. Moreover, i should compare repaint window surface (clipped
region) to something...but to what ?
I would be very glad if i can get some tutorial or example on similar
topics. It will help me in my understanding.
thx,
Al.
I have a question about drawing windowed control.
For example, i have a windowed control, let's called it C1 (as container
for example).
its width = 300 px and height = 200 px.
C1 displays some other windowed controls, however, not all are displayed
initially when C1 is painted. for example C2 can be located on point
500,300 (x,y).
therefore, C2 is not displayed initially,
I have 4 buttons which allow me to scroll from right to left or bottom
to top the "canvas" (display surface) of C1.
However, i would like to understand how i can shift this canvas based on
button click ?
I mean if i click on "Right Button" 10 times, the drawing region of C1
should be re-draw to reflect this shift. So, C1 should be repaint to
display the region : 10,0,300,200 (x,y,width,height).
I suppose that i have to use the paint event with clip, cliprectangle
and bound. Moreover, i should compare repaint window surface (clipped
region) to something...but to what ?
I would be very glad if i can get some tutorial or example on similar
topics. It will help me in my understanding.
thx,
Al.