Discussion Board
-
How to convert TText* to descriptor which can be used in gc.DrawText()
2001-12-10, 15:41
#1
Registered User
How does one convert TText* to descriptor which can be used in gc.DrawText()?
-
RE: How to convert TText* to descriptor which can be used in gc.DrawText()
2001-12-10, 17:28
#2
Regular Contributor
Like this:
TText *blah = (unsigned char *) "blah";
TInt len = User::StringLength(blah);
gc.DrawText(TPtr(blah, len, len), TRect(TPoint(10, 0), TSize(100, 20)), 20, CGraphicsContext::ELeft, 0);
or, if your TText* is a C-style zero terminated string:
TText *blah;
gc.DrawText(TPtrC(blah), ...);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules