Jump to content
Tuts 4 You

How To Make The Text Scroll


arlequim

Recommended Posts

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

  • arlequim

    6

  • diablo2oo2

    5

  • yamraaj

    4

  • wunder

    4

  • 2 months later...

Sorry for bumping, but diablo2oo2, I ran into a small issue with your text scroller.

Namely, it won't initialise in my current app. I lost my previous source where it previously was working fine, and im at a loss to remember the right way to init it.

Anyways, here's my current code:

	   ....
LOGFONT LogFont;
HFONT font;
SCROLLER_STRUCT scroller;
LogFont.lfStrikeOut = 0;
LogFont.lfUnderline = 0;
LogFont.lfHeight = 8;
LogFont.lfEscapement = 0;
LogFont.lfCharSet = DEFAULT_CHARSET;
LogFont.lfQuality = ANTIALIASED_QUALITY;
strcpy(LogFont.lfFaceName, "Times New Roman");
font = CreateFontIndirect(&LogFont);
scroller.scroll_hwnd = hWndDlg;
scroller.scroll_text = "vbhfghfghfghfhfchgfhgfhg";
scroller.scroll_x = 0;
scroller.scroll_y = 10;
scroller.scroll_width = 280;
scroller.scroll_hFont = font;
scroller.scroll_textcolor = 0x00F7DDCC;
CreateScroller(&scroller);

Any help at all would be appreciated.

Link to comment

Why not simpling your life...... :) look

#include "TextScroller.h" // Diablo's Scroller Header "Useless" but needed :PSCROLLER_STRUCT Scr; // Define Scroll Structure Var
LOGFONT LogFont={12,6,0,0,FW_THIN,0,0,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_
PRECIS,DEFAULT_QUALITY, 0,"Terminal"};
Scr.scroll_hwnd=hWnd; // Handle Of Dialog "GetDC()" lol :)Scr.scroll_text=("My Simple Damn Text To Scroll With Diablo's Lib And It Seems To Work Fine ?! Cool !!"); // Text ??Scr.scroll_x=0; // Blah
Scr.scroll_y=10; // Blah
Scr.scroll_width=280; // BlahScr.scroll_hFont=CreateFontIndirect(&LogFont); // Use a FontLog for god's sake;)Scr.scroll_alpha=210; // TRANSPARENCY
Scr.scroll_textcolor=0x00FFFFFF; // White Font Color :DCreateScroller(&Scr); // Show Time !

Well basicly that's all but remember to include the TextScroller.lib into project.

Cya....

PS: better use () for your text :D

Link to comment

Angel-55: Thanks for that :P . I should have stuck with simplicity when filling out diablo2oo2's struct. And thanks again for the brief code sample, it really helps ^_^ .

Edited by mudlord
Link to comment
  • 6 months later...
  • 2 years later...

Thanks Ufo-Pu55y I was looking for something like this, my sine example is too messy for me... however this link is dead :dunno:, can you please re post were this link was going to lead too?

Thank you

never mind I think it is this:

http://forum.tuts4yo...ds&showfile=195

I don't really understand the sine code here anyways

Link to comment

Of any help? Had this around my pc laying.

Not mine. But maybe of use for you.

Any code is good code... I have those ... I was looking for a simple sine scroll.... I have one, that is to complicated

Link to comment

Thanks I have those... That is the sine scroll that I was referring to that I hate ( the one by comrade, too messy).... I started a reply to this thread since Ufo-Pu55y mentioned that it was only a few lines to add a sine to a text scroll, I thought There was something different... :(

I have a folder full of text scroll , I think I have them all....

I would love to know how to do this:

http://cyberdoomsyst.../ripp/ziuhu.rar

the above is a ripp

Link to comment

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