🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

DrawTextEx

#7651
From: Petar Popara
Date: Fri, 31 Dec 2004 13:14
20 lines
1345 bytes
    I'm using this code:

char a[200];
strncpy(a, cFileName.c_str(), 199);

RECT r;
r.left   = 0;
r.top    = 0;
r.bottom = lb->ItemHeight;
r.left   = lb->Width - 20;

if (!DrawTextEx(lb->Handle, a, 199, &r, DT_MODIFYSTRING | DT_PATH_ELLIPSIS,
NULL))
  return;
else
    lb->Items->Add(a);

    But, it allways fails. "lb" it TListBox control. Am I doing something 
wrong? I don't want to draw anything, just to format string. 
Technical Details
Message-ID: <41d5500e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!fr.ip.ndsoftware.net!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

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,42d3caa052e60398,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Petar Popara" <none>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: DrawTextEx
Date: Fri, 31 Dec 2004 14:14:43 +0100
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 193.138.1.206
Message-ID: <41d5500e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1104498702 193.138.1.206 (31 Dec 2004 05:11:42 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!fr.ip.ndsoftware.net!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