Click to See Complete Forum and Search --> : ScrollDC() ???


Devil Panther
September 26th, 2003, 03:50 AM
hello,

I want to make an internet browser, but I have a problem with the scroll, I've heard that the scrollDC function can scroll graphics, but how do scroll so many image items + text?

How does it all work?


Thank you.

JasonD
September 27th, 2003, 04:04 PM
Text is graphics. Just picture drawing text as a routine that plots a bunch of pixels in the shape of letters, just like any other graphic routine plots pixels.

Devil Panther
September 27th, 2003, 04:26 PM
That's not the point
the question is how do i do it...

JasonD
September 29th, 2003, 09:23 AM
Devil Panther, you asked "I've heard that the scrollDC function can scroll graphics, but how do scroll so many image items + text?". This seems to imply that you think ScrollDC scrolls images but not text. Since text is graphics, ScrollDC will scroll whatever is in the window's client area that is to be scrolled.

I think the question you wish to ask is how do you refresh the invalid area that remains after the scroll. Basically, you need to know where the location of all your text/images are, relative to the new location after the scroll, so when you paint them in the invalid area, they will 'line-up' with the images/text that has been scrolled. I am not sure how to answer this in more detail without writing code for you. Perhaps you could try a simple example with one image, and a little bit of text to see how it works, and go from there.

Devil Panther
September 29th, 2003, 01:13 PM
maybe you can give me an example for that one image+text scroll, i think it's the best way for me to understand.

thanks

JasonD
September 29th, 2003, 04:06 PM
I'm sorry, but I really do not have time to throw an example together for you. I have never actually used the function; I just know how it works.

First, do you know how to use ScrollDC with a window that just contains graphics? If not, this should be your first step, so you can understand exactly how the function works.

Devil Panther
September 30th, 2003, 11:21 AM
i tried reading the msdn... but didn't understand much of it...

JasonD
October 1st, 2003, 08:59 AM
I would use ScrollWindow (http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/scrollbars/scrollbarreference/scrollbarfunctions/scrollwindow.asp), unless there is a specific reason you wish to use ScrollDC. This function is easier to use.

Devil Panther
October 1st, 2003, 11:32 AM
I think that's what I've been looking for


thanks alot dude