×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    25

    How to convert TText* to descriptor which can be used in gc.DrawText()

    How does one convert TText* to descriptor which can be used in gc.DrawText()?

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    157

    RE: How to convert TText* to descriptor which can be used in gc.DrawText()

    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
  •  
×