×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2004
    Location
    china
    Posts
    11

    about window-owning control and non-window-owning control

    Q1:
    I know Dialog is a window-owing control.Only one? else?
    Q2:
    I get codes from SDK, as follows:
    CMyControl::ConstructL()
    {
    CreatWindowL(); //this makes the control window-owning
    SetRectL(ClientRect());
    ActiveL();
    }
    this code is an example of ow to construct a window-owning control,i know,but i am confused that where is the window-owning control? what's the meaning of "window-owning control"?

    Q3:
    A non-window-owning control must be contained within a window-owing control.
    for example(from SDK):
    CEikTextListBox* list=new (ELeave) CAknSingleStyleListBox();
    list->ConstructL(this);
    list->SetContainerWindow(*this);
    ......
    list is a ListBox which belonged to non-window-owning control,
    so it must be contained to a window-owning control,in the above code,what's a window-owning control? if i delete this sentence"list->SetContainerWindow(*this);",what will be happened?


    thank u!
    shanglinhu

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi,

    a) each control must be assciated with window
    b) control can own a window. By window i dont mean a GUI control, but class, which is associated with a control and managed by windows server, for example, when dialog dissapear the control below it redrawed - window server caring about overplapping, hidding windows...
    c) window could be shared by many controls, which saves resources, on the clinet and server side. For example when 4 windows must be redrawed it costs much more resources and times when clinet-server communication is done. It is less expensive to use one bigger window. There are many window owning controls.
    Example
    Scrollbars in UIQ could be constructed as window floating above container controls or as a simple non-window control...
    Bye
    STeN

Posting Permissions

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