Click to See Complete Forum and Search --> : Text horizontal scrolling for windows HELP!! :)


Jim Carr
April 15th, 1999, 11:21 AM
Please help! I am trying to locate some sample code on how to manaully word wrap and maunal horizontal autoscroll text on a direct X surface or embed it on a
window. I know that sounds confusing..i'm kinda the middle man in a windows game development team. but that's our problem at hand. Any suggestions?

In a nutshell...we're trying to get text that people type in when in the game, to autoscroll on the bottom of our Front End for the game. but we can't figure it out or
get it working properly. any help or guidance you could offer, I would greatly appreciate!

Jim Carr
james_carr@merck.com

ValerieB
April 15th, 1999, 11:44 AM
Here's an idea I just thought of, perhaps it will help you out. Please remember though that I have not tried this out so it may not work.

I'm assuming that there's a maximum string length that can fit in the display area on your User Interface, and that it's a "well known" limit. Try out this algorithm:

1) Every time the user enters a new character, get the string's length.
2) Comare the string's length against the maximum possible length (the "well known" limit).
3) If the string's length is less than the limit, do nothing.
4) If the string's length is longer than the limit, find the location of the last white space character and push everything after it onto the next line.

I hope this helps! Good luck!

Valerie Bradley
http://www.synthcom.com/~val
val@synthcom.com