Jump to content
Tuts 4 You

How To Make The Text Scroll


arlequim

Recommended Posts

Posted

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

Ted.

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

  • arlequim

    6

  • diablo2oo2

    5

  • yamraaj

    4

  • wunder

    4

Posted (edited)

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
Posted

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

Posted

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

Posted

@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' :)

Posted

@PuNKDuDe

you are always welcome ...

Posted
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.

  • 9 months later...
Posted

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?

Posted
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

Posted
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

Posted
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.

Posted
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

  • 3 weeks later...
Posted (edited)

Coded here my text scroller, really easy...

appz.rar

Edited by arlequim
Posted

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

btw anyone do any sine scrollers with ASM?

Posted

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

Posted

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

DoubleBuffered := True;

Will remove the flicker from timer :)

  • 1 month later...
Posted

Thx a lot men...

It's a greet subject...

--> Are they other Text Scroll?

  • 1 month later...
Posted (edited)

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
Posted (edited)

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
Posted

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

Posted
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?

Posted (edited)
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
Posted
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!

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

×
×
  • Create New...