🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3299

DrawText / DrawText, word wrapping and long strings

#3299
From: Mike Collins
Date: Wed, 12 Jul 2006 16:17
21 lines
1966 bytes
Hi all, got what seems like a really simple problem but can work out how to 
solve it.  I'm coding up a function in a DLL that will print a registration 
card for the user to send to use.

Instead of having the hassel of using a reporting tool, i decided to simply 
use the TPrinter object and write directly to the canvas.  All seems pretty 
fine and dandy until i came to try and display the registration code.  It is 
the product of an public / private encryption system and the resultant data 
/ ansistring is 172 characters long and is a solid block of text without any 
spaces in it.

When I use this with DrawText or DrawTextEx it will not wrap the test so the 
string goes of the end of the canvas / page.  I assum this is because it 
can't find any blank spaces between 'words'.  I've tried all variations of 
the flags but i get the same results...

Does anyone have any suggestions that i can use?

Many thanks in advance...

Mike C 
Technical Details
Message-ID: <44b5208b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!news2.euro.net!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,27d018c4a89bdf5b,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Mike Collins" <its@TheBottomOfThePost.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: DrawText / DrawText, word wrapping and long strings
Date: Wed, 12 Jul 2006 17:17:15 +0100
Lines: 23
Organization: SDA Ltd
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.2663
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2663
NNTP-Posting-Host: 81.2.92.14
Message-ID: <44b5208b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1152721035 81.2.92.14 (12 Jul 2006 09:17:15 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!news2.euro.net!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail