Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Mar 2006

    Drawing outside CCoecontrols Window area

    Hi All,

    I want to know how to draw outside a controls window?? Also can a CCoecontrol derived control have two windows in different areas of screen.

    What i want is to put a custom image for Menu Bar the menu Soft Keys.
    I would like to use two windows for the same. One for the area above the Menu Bar and another for the Menu Bar area.

    Please tell me how I could do tht. Thanks Much.

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003

    Re: Drawing outside CCoecontrols Window area

    you can only draw in your own windows, so you gotta make a window somehow into the points where you want to draw into the screen. I don't think you could have two separated areas for same window, though you could make two windows in your app if you wish.


  3. #3
    Regular Contributor
    Join Date
    Mar 2006

    Re: Drawing outside CCoecontrols Window area

    Hi yucaa,

    Thanks for the reply.But I want to be more clear.Here is my problem.
    I have

    CMycontrol is a Compound control.

    CMycontrol : public CCoecontrol
    //Class declaration

    CCoeControl * ComponentControl; //Must have its own window
    //Other than CMycontrol

    Now in my control's, constructL ( ) i have,

    CMyControl::ConstructL(TRect aRect)
    CreateWindowL( ); //creates a window
    SetRect(); //Bounding window area set
    ActivateL(); //Activate the controls window

    ////////// I want to have soemthing like //////////////////////////////////

    ComponentControl.SetRect( anotherRect );
    ComponentControl.ActivateL( );


    Then after the above can i have:

    // Here I want to draw on ComponentControls window area
    //This area will be non-intersecting with parent window area.

    Simply speaking my problem is parent and child controls having their own window,.............and both the windows must be non-intersecting.

    And as i understand calling parents Draw ( ).....will call childs Draw( ),...and each ones draw in their own areas.
    I will greatly appreciate any code with regard to my problem.Thanks Much.

  4. #4
    Regular Contributor
    Join Date
    Dec 2005
    Bangalore, India

    Re: Drawing outside CCoecontrols Window area

    First thing is
    we should not call Draw Method by ourself, it is an implementation for the abstract base class. the system will take care of initializing graphics context and other stuff before calling Draw method.

    Second thing is,
    the component control must be inside the rectangular region of CMyControl. maybe whole of the region or a part of it. but not outside CMyControl region.

    Third is
    you can have more than two component inside your CMyControl. make sure that the region CMyControl region is sufficient to hold both ur child window rect.
    Best Regards

Similar Threads

  1. Problem Creating Window Using RWindow and putting More controls on it
    By er_gps212 in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-10-28, 06:22
  2. Drawing in system area(the part draws battery&radio signal)
    By toughworker in forum Symbian User Interface
    Replies: 2
    Last Post: 2004-12-22, 01:28
  3. About window views
    By thodime_guru in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-06-17, 18:00
  4. Drawing on window that belongs to other app
    By Uszatek in forum Symbian
    Replies: 3
    Last Post: 2003-08-16, 10:19

Posting Permissions

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