Jump to content
Tuts 4 You
Sign in to follow this  
arlequim

How To Make The Text Scroll

Recommended Posts

Teddy Rogers

I already attached it to the original post a few days ago, please take a look... :)

Ted.

Share this post


Link to post
yamraaj

Just came to know abt this excellent scroll lib from rewolf...It' open source....so it won't be difficult to edit this for vertical scroller coz it's for horizontal scroll

Check it out from http://rewolf.cjb.net/

I'll attach in case any problems

scroller.v1.01.zip

Edited by yamraaj (see edit history)

Share this post


Link to post
starzboy

@yamraaj ... in wolfs source ... balck text dosent work ...

Share this post


Link to post
PuNkDuDe

I was experimenting a while ago coding in asm some text effects using api, if people are interested i can send/post some sources..

Share this post


Link to post
Angel-55

@PuNKDuDe

Why Don't You Attach The Sources ...

Many Of Us Needs Such Things And Are Intrested In It PuNKDuDe

And Thanx' In Advance Bro' :)

Share this post


Link to post
starzboy

@PuNKDuDe

you are always welcome ...

Share this post


Link to post
AK-47
if people are interested i can send/post some sources..

That would be nice PuNkDuDe

if u can send em to me plzz

thks in advance

AK-47.

Share this post


Link to post
zart

Has anyone here used ReWolf from HtB's scroller lib?

I can't seem to get it to scroll only on my window... The scrolling works fine - however it doesn't seem to use my form - it takes whatever coordinates I give it as the screen. So if I give it coords to my actual form, it will scroll - but when form is moved it stays in the same spot...

Any insight to this?

Share this post


Link to post
yamraaj
Has anyone here used ReWolf from HtB's scroller lib?

I can't seem to get it to scroll only on my window... The scrolling works fine - however it doesn't seem to use my form - it takes whatever coordinates I give it as the screen. So if I give it coords to my actual form, it will scroll - but when form is moved it stays in the same spot...

Any insight to this?

Maybe you are not passing handle of your window. Have you looked in the sources provided with the lib. When you create scroll thread then u should pass your window handle too.

From source

_init:

xor eax,eax

push 0

push esp

push eax

push hDlg ;This is what needs attention

push offset thProc

push eax

push eax

call CreateThread

Share this post


Link to post
zart
Has anyone here used ReWolf from HtB's scroller lib?

I can't seem to get it to scroll only on my window... The scrolling works fine - however it doesn't seem to use my form - it takes whatever coordinates I give it as the screen. So if I give it coords to my actual form, it will scroll - but when form is moved it stays in the same spot...

Any insight to this?

Maybe you are not passing handle of your window. Have you looked in the sources provided with the lib. When you create scroll thread then u should pass your window handle too.

From source

_init:

xor eax,eax

push 0

push esp

push eax

push hDlg ;This is what needs attention

push offset thProc

push eax

push eax

call CreateThread

Well isn't that the same as... invoke CreateThread,0,0,addr thProc,hWnd,0,addr ThreadID ?

Then I use...

mov eax, hWnd

call GetDC

mov scrTest.hBkgDC, eax

Share this post


Link to post
yamraaj
Well isn't that the same as... invoke CreateThread,0,0,addr thProc,hWnd,0,addr ThreadID ?

Then I use...

mov eax, hWnd

call GetDC

mov scrTest.hBkgDC, eax

The above code is wrong. Should be

push eax

call GetDC

That's why better stick to invoke if using masm

u could post ur source or i will code a quick one if u want.

Share this post


Link to post
zart
Well isn't that the same as... invoke CreateThread,0,0,addr thProc,hWnd,0,addr ThreadID ?

Then I use...

mov eax, hWnd

call GetDC

mov scrTest.hBkgDC, eax

The above code is wrong. Should be

push eax

call GetDC

That's why better stick to invoke if using masm

u could post ur source or i will code a quick one if u want.

Yea I changed everything to invokes and fixed it up a little bit and it all worked fine, thanks guys

Share this post


Link to post
m1sch13f

Hey thanks a lot everyone who posted in this thread its helped me a lot!

btw anyone do any sine scrollers with ASM?

Share this post


Link to post
m1sch13f

Thanks Ufo. I am going to have to try using this in my next keygen. thanks again mate

Share this post


Link to post
ante0

I dont know if this will work in anything besides delphi, but:

DoubleBuffered := True;

Will remove the flicker from timer :)

Share this post


Link to post
MjIrIm

Thx a lot men...

It's a greet subject...

--> Are they other Text Scroll?

Share this post


Link to post
diablo2oo2

I have a problem with my own coded scroller. It works fine on usual windows. but when i set the window to WS_EX_LAYERED and make it transparent, the scroller doesnt move so smooth....

any ideas? i attached also the scrollercode.

scroller.window.problem.rar

Edited by diablo2oo2 (see edit history)

Share this post


Link to post
Ufo-Pu55y

I didn't try, but maybe double buffering helps, when it's layered :?

Swapping 2 DCs, after the scroller has been drawn or something.

Edited by Ufo-Pu55y (see edit history)

Share this post


Link to post
reptilla

some links are broken! :blink:

Share this post


Link to post
Loki

Possibly because the thread is more than 2 years old? :P

Share this post


Link to post
diablo2oo2
I didn't try, but maybe double buffering helps, when it's layered :?

Swapping 2 DCs, after the scroller has been drawn or something.

i really dont understand what you mean. because i am new in gfx coding... :wacko:

ufo, are online on irc sometimes?

Share this post


Link to post
Ufo-Pu55y
I didn't try, but maybe double buffering helps, when it's layered :?

Swapping 2 DCs, after the scroller has been drawn or something.

i really dont understand what you mean. because i am new in gfx coding... :wacko:

ufo, are online on irc sometimes?

Ah lol :happy:

I remember I had that prob in the past. All you need is to update the layered window.

I tried with UpdateLayeredWindow first like I'm doing for uPPP, but somehow it didn't work. Anyway

SetLayeredWindowAttributes is enough and doesn't require the mess of args for UpdateLayeredWindow.

Here we go:

	@loop:
.if [esi].scroll_pause==0
invoke BitBlt,local_hdc_text,0,0,[esi].scroll_width,local_scroll_height,local_hdc_window_copy,[esi].scroll_x,[esi].scroll_y,SRCCOPY
invoke TextOut,local_hdc_text,ebx,0,[esi].scroll_text,local_text_len
invoke BlendBitmap,local_hdc_text,local_hdc_window_copy,local_scroll_height,[esi].scroll_width,[esi].scroll_x,[esi].scroll_y,[esi].scroll_textcolor
invoke BitBlt,local_hdc_window,[esi].scroll_x,[esi].scroll_y,[esi].scroll_width,local_scroll_height,local_hdc_text,0,0,SRCCOPY
dec ebx
.if ebx==local_text_endpos
;---reset text position to begining---
mov ebx,[esi].scroll_width
.endif invoke SetLayeredWindowAttributes,[esi].scroll_hwnd,0,155,LWA_ALPHA; Well.. not 155 but the used transparency ofc ! .endif
invoke Sleep,30
jmp @loop

;)

Edited by Ufo-Pu55y (see edit history)

Share this post


Link to post
diablo2oo2
I didn't try, but maybe double buffering helps, when it's layered :?

Swapping 2 DCs, after the scroller has been drawn or something.

i really dont understand what you mean. because i am new in gfx coding... :wacko:

ufo, are online on irc sometimes?

Ah lol :happy:

I remember I had that prob in the past. All you need is to update the layered window.

I tried with UpdateLayeredWindow first like I'm doing for uPPP, but somehow it didn't work. Anyway

SetLayeredWindowAttributes is enough and doesn't require the mess of args for UpdateLayeredWindow.

Here we go:

	@loop:
.if [esi].scroll_pause==0
invoke BitBlt,local_hdc_text,0,0,[esi].scroll_width,local_scroll_height,local_hdc_window_copy,[esi].scroll_x,[esi].scroll_y,SRCCOPY
invoke TextOut,local_hdc_text,ebx,0,[esi].scroll_text,local_text_len
invoke BlendBitmap,local_hdc_text,local_hdc_window_copy,local_scroll_height,[esi].scroll_width,[esi].scroll_x,[esi].scroll_y,[esi].scroll_textcolor
invoke BitBlt,local_hdc_window,[esi].scroll_x,[esi].scroll_y,[esi].scroll_width,local_scroll_height,local_hdc_text,0,0,SRCCOPY
dec ebx
.if ebx==local_text_endpos
;---reset text position to begining---
mov ebx,[esi].scroll_width
.endif invoke SetLayeredWindowAttributes,[esi].scroll_hwnd,0,155,LWA_ALPHA; Well.. not 155 but the used transparency ofc ! .endif
invoke Sleep,30
jmp @loop

;)

Ufopussy! you are my hero! it works. next dup version with textscroller! thank you!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×
×
  • Create New...