Hallo!

How can I scroll a big bitmap (HDC) without BitBlt() or DirectX. Is there any way to set just the Pointer of position?

Nordwind
(Sorry for my bad english...)
Posted on 2001-12-19 10:39:04 by Nordwind64
hossa

take a look at this sample file....

Scroll PROC
call GetCurrentThread
push 0
push eax
call SetThreadPriority

mov ebx,xpos
wsk01:

push 1 ;repaint
push height ;height
push width_ ;width
push ypos ;y ^^^^^^^^^
push ebx ;x >>>>>>>>>
push hbitmapa ;uchwyt elementu
call MoveWindow

push time
call Sleep

cmp ebx,-175
jne right

mov ebx,340
jmp wsk01

right:
dec ebx

jmp wsk01

xpos equ 63
ypos equ 20


height equ 54
width_ equ 168
time equ 32

jmp wsk01

and download the samplefile :)
Posted on 2001-12-19 11:33:20 by Max
Hallo,

sorry, I don't want to move the complete window, I want to scroll a big bitmap. I just want to change the information where the bitmap begins in the windows.

Is the any way?


Thanks, Nordwind
Posted on 2001-12-19 14:25:10 by Nordwind64
I don't have any code, but I would think you could set the update region and then just change the coordinates where you paste the image on the screen - effectively, scrolling it within the window.
Posted on 2001-12-19 14:38:49 by bitRAKE
Hi Max !

Does your example run on Win2K ? (I won't on my ...)


Hi Nordwind64 !

I want to add the following suggestion at bitrakes' reply:

Perhabs it is enough just to change the origin of your DC's coordinate-system !


Greetings, CALEB
Posted on 2001-12-19 15:09:05 by Caleb
Hi.

And how should I set new coordinates? That's is my question...

Greeting, Nordwind.
Posted on 2001-12-19 15:21:50 by Nordwind64
This was found on one of the user of this webboards pages, I believe it is roy. I think it will do what you though.Click here
Posted on 2001-12-19 19:42:40 by Betrayed
Hossa

i dont know if it work on w2k ,i dont have it :)

but im wondering about your question.
if you take a look at the samplefile you will see that NOT a "window" will move.........the bitmap will move by setting new winposition.

in fact i use it in a small demo to fly my logo from left to right.
Posted on 2001-12-20 17:37:15 by Max
try ScrollDC()

btw Whats wrong with BitBlt()?
Posted on 2001-12-21 06:17:02 by Boggy
Hi and thank you!

<Max: Sorry, your source uses just BitBlt for scrolling...

<Betrayed: Sorry, only your window moves...

<Boggy: I will try ScrollDC, thank you. BitBlt is very slow. I'm looking for a way to scroll without pasting gfx-datas, just set new position pointers.

Thanks, Nordwind
Posted on 2001-12-21 07:01:41 by Nordwind64
Nordwind64, I don't think it's possible without a BitBlit. You just change where the blit is performed. The fastest way would be to have the image in video card memory (DX).
Posted on 2001-12-21 10:25:18 by bitRAKE