×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    7

    Non Window Owning Control that is not a component control of the View

    Hi,

    If a CCoeControl is not a component control of the AppView, and is not window owning, How do I draw it?

    What I have done is as follows:

    CAppView::Draw(){
    -------

    iControl->DrawNow(); //iControl is a CXXControl type
    //CXXControl derives frm CCoeControl
    -------
    }

    CXXControl::Draw(){
    --------
    }

    When I invoke DrawNow(), Draw() doesnt get called.....Any reason?


    Regards
    Sriram

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142
    AFAIK anything that draws to the screen need to own a screen, so in case your container doesn't own a screen, it wont be able to draw on it.

    So you'd better change your program structure.

    yucca

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    7

    CApp

    Hi,

    CAppView in the example is a window owning control. I call CreateWindowL() in CAppView::ConstructL(). Also, I call iControl->SetContainerWindowL(*this).

    The main issue here is whats the difference between ActivateL() and DrawNow(). The Help files are not that useful

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142
    Hi

    In simple way, just call ActivateL() in the end of your containers ConstructL() and then call DrawNow() in the code where ever you want to re-draw the screen.

    also remember to call CreateWindowL() & SetRect(), before calling the ActivateL().

    yucca

Posting Permissions

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