×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    14

    DrawNow() don't involve Draw()

    I have a problem now.
    In S60 3rd fp2,DrawNow() don't involve Draw(),but it can in the S60 3rd mr.

    This is my draw() function.
    void CMyCoeControl:raw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();
    gc.Clear();

    gc.SetBrushStyle(CGraphicsContext::ENullBrush);
    gc.SetPenStyle(CGraphicsContext::ESolidPen);
    gc.SetPenColor(KRgbBlue);

    gc.UseFont(iFont);
    gc.DrawText(iText, aRect, iFont->HeightInPixels(), CGraphicsContext::ECenter);
    gc.DiscardFont();
    }
    Thank you!

  2. #2
    Registered User
    Join Date
    May 2007
    Location
    Poland
    Posts
    606

    Re: DrawNow() don't involve Draw()

    Hello,
    it s rather not possible that it happens.

    How do you have defined your iFont
    Are you sure that you put text to iText before you call DrawNow ?

    good luck

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: DrawNow() don't involve Draw()

    Hi,

    DrawNow() internally calls your Draw() api and it issue a request to the windows server which checks the validity of your window etc etc and then calls Draw() api it is not a synchrous call.
    Regards,
    Sriky

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: DrawNow() don't involve Draw()

    also make sure you do not block the control flow.

  5. #5
    Registered User
    Join Date
    Jul 2008
    Posts
    14

    Re: DrawNow() don't involve Draw()

    Thanks to nuker85 sriky27 and skumar_rao!

    I am inspired.
    Last edited by agan1003; 2008-10-16 at 16:04.

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    14

    Re: DrawNow() don't involve Draw()

    Quote Originally Posted by nuker85 View Post
    Hello,
    it s rather not possible that it happens.

    How do you have defined your iFont
    Are you sure that you put text to iText before you call DrawNow ?

    good luck
    I set the draw() to null,it can't be involved by drawnow()!

Similar Threads

  1. DrawNow() failed to call Draw()
    By kishore84 in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-05-15, 16:15
  2. why can i not draw line in Draw()?
    By isarc in forum Symbian
    Replies: 7
    Last Post: 2008-05-13, 10:51
  3. Replies: 0
    Last Post: 2008-04-15, 08:38
  4. Thread and Draw Command
    By vitormcruz in forum Symbian
    Replies: 3
    Last Post: 2007-11-01, 20:50
  5. Call function DrawNow caused Access violation error ?!
    By goready@163.com in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-08-05, 04:00

Posting Permissions

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