🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: DrawTextEx

#7713
From: Hans Galema
Date: Tue, 11 Jan 2005 08:59
21 lines
1966 bytes
Remy Lebeau (TeamB) wrote:

> It has to be dependant on cFileName.  In the original snippet, Petar was
> hard-coding the length of 199 when calling DrawTextEx(), which will cause
> DrawTextEx() to render text that does not actually exist if cFileName is
> less than 199 characters.  That is why I used a variable to specify the
> actual length of the text to render.

Please read my reply and my code again.

As the actual content of array a is used untill the first
\0 is encountered strlen (a) is supplied as parameter for
DrawTextEx.

So only the contents of a is important. That a has been filled
with the contents of cFileName is nice to know but not important.
It could have been filled from somewhere else to.

Using a and strlen(a) as parameters cares for all filling origines.

Hans.
Technical Details
Message-ID: <41e395c2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41d5500e$1@newsgroups.borland.com> <41d983be@newsgroups.borland.com> <41d99396$1@newsgroups.borland.com> <41da8cbd$1@newsgroups.borland.com> <41dae41f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,42d3caa052e60398
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 11 Jan 2005 09:59:58 +0100
From: Hans Galema <notused@notused.nl>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: DrawTextEx
References: <41d5500e$1@newsgroups.borland.com> <41d983be@newsgroups.borland.com> <41d99396$1@newsgroups.borland.com> <41da8cbd$1@newsgroups.borland.com> <41dae41f$1@newsgroups.borland.com>
In-Reply-To: <41dae41f$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.201.248
Message-ID: <41e395c2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1105434050 129.125.201.248 (11 Jan 2005 01:00:50 -0800)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail