×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    8

    DrawText() error

    Hi,
    I can not understand why this code is not work. Emulator give me error msg box.
    void CRiiviContainer::Draw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();

    LIT(KExampleText,"blacktext");
    gc.DrawText(KExampleText, TPoint(50,50));

    //gc.DrawText(_L("Text"), TPoint(50,50)); not Help too



    }

    Many thanks
    Igor

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    at least you should set a font that is used in writing the text, before actually trying any writing.

    yucca

  3. #3
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    what kind of error?
    is it really in Draw() method?
    as yucca said UseFont() is your friend... if you forget to call this before drawing it might panic the application.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×