Hello Friends !
I am just a newbie with respect to WinASM !

I would like to see a very basic example of a scrolling text !
It dosent have have to be without flicker !

I have some examples but ... i am not able to follow !

Hope i get some good help i here !

Regards !
Posted on 2006-08-10 10:00:35 by starzboy
I will give you a hint:

(1) Study up IcZelion's Tutorial No.4 -> Painting with Text
(2) Sutdy up SetTimer API -> MSDN
(3) Study up the InvalidateRect API -> MSDN

And put the three together...

A few more helping hints:  The bulk of the work can be learned from Iczelion's Tutorial No.4.  Modifying it to scroll text is then done by seting upon the window's creation to provide a WM_TIMER message at a specific refresh rate.  Handing each WM_TIMER message you would then indicate the next text position (in a variable) and then call InvalidateRect to force a repaint of the window (and the text in the next shown position).

You will definitely get flicker from this, but this is simplest, and what you asked for.

Once you get this down pat, look into separate DC's to paint on a DC ahead of time, and then when its time to handle the WM_PAINT command, you simply copy it all in one go.  This is the basics of back-buffering that removes flicker.

Hope it helps..
Posted on 2006-08-10 19:27:48 by NaN