Archived

This topic is now archived and is closed to further replies.

EmpyrealHell

Multi Line Text in Direct Draw

Recommended Posts

Ok, I have been banging my head against a wall on this for a couple days now, so I need your guys'' help. I can''t seem to get VC6 to compile and run anything that has the strncat function in it, so I can''t write my own function to parse the string based on the ''\n'' character. When I try this, the program opens, and then immeadiatly closes, I have no idea why. I was wondering if there is a premade function that will draw text to the screen and span it across multiple lines using the \n character. I know in perl and php there are ways to explode the string into an array of strings, but I can''t find a function in the C++ headers that does that. Any method is fine, as long as it works. This would be a great help, thanks guys.

Share this post


Link to post
Share on other sites
Just a guess, but I doubt the problem is really with strncat(). Try using the debugger. Just knowing that the program crashes doesn''t really prove that strncat() is the problem. It may actually be that you are correctly getting your string separated onto different lines, but your drawing code can''t handle multiple lines correctly. If you haven''t used the debugger much, or at all, I strongly suggest you learn. (If you''re in fullscreen mode, you''ll probably have to change things a bit to get the debugger to work. I haven''t used DDraw, though, so I don''t know the specifics.)

Share this post


Link to post
Share on other sites