×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    31

    Draw() in CAknDialog.

    Hi,

    Draw() method is not drawing in CAknDialog derived class.

    My Draw method is as below:

    void CMyDialog::Draw(const TRect &aRect) const
    {
    CWindowGc& gc = SystemGc();
    gc.SetPenStyle( CGraphicsContext::ENullPen );
    gc.SetBrushColor(219);
    gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
    gc.Clear(aRect);
    }

    My dialog resource is like this..

    RESOURCE DIALOG r_show_word_dialog
    {
    flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect
    | EEikDialogFlagButtonsRight | EEikDialogFlagNoTitleBar
    | EEikDialogFlagCbaButtons|EEikDialogFlagWait;
    buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
    }

    I am drawing using DrawNow(). I also checked if IsReadyToDraw() return true.

    Thanks.

    Mahavir

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Draw() in CAknDialog.

    You can check in the emulator if your code is really left out, just but a breakpoint in it. My guess would be that the contained components of the dialog simply overdraw the whole area.

  3. #3
    Registered User
    Join Date
    Mar 2006
    Posts
    31

    Re: Draw() in CAknDialog.

    Yes I also think that contained controls overdraws the drawing..

    But there is no control in dialog.. Dialog itself is control (I think)..

    How to avoid this overdrawing?

    Mahavir

  4. #4
    Registered User
    Join Date
    Mar 2006
    Posts
    31

    Re: Draw() in CAknDialog.

    Solved the problem.. I override CCoeControl's MinimumSize() in following way..

    TSize MinimumSize()
    {
    TSize resSize ;
    AknLayoutUtils::LayoutMetricsSize(AknLayoutUtils::EMainPane, resSize);
    return resSize ;
    }

    Mahavir

Similar Threads

  1. why can i not draw line in Draw()?
    By isarc in forum Symbian
    Replies: 7
    Last Post: 2008-05-13, 10:51
  2. Replies: 0
    Last Post: 2008-04-15, 08:38
  3. Thread and Draw Command
    By vitormcruz in forum Symbian
    Replies: 3
    Last Post: 2007-11-01, 20:50
  4. Replies: 2
    Last Post: 2007-04-04, 02:11
  5. Draw lines into EDWIN like in SMS app
    By stenlik in forum Symbian User Interface
    Replies: 6
    Last Post: 2006-11-30, 09:04

Posting Permissions

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