Symbian3/SDK/Source/GUID-352850A9-227F-45DB-8DCD-C6268954B4ED.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 12:39:03 +0100
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
permissions -rw-r--r--
Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-352850A9-227F-45DB-8DCD-C6268954B4ED" xml:lang="en"><title>Window
owning and non-window owning controls</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-A403D2F8-7ED3-4DE6-92E8-4B16CC646CA6"><title>Window-owning
controls</title>
<p>Window-owning controls have the same size and position as a window in
the display. Each window has a one-to-one relationship with the control that
covers it, and shares its behavior with that control.</p>
<p>Examples of window-owning controls include:</p>
<ul>
<li><p>top-level control in <xref href="GUID-B5DE1C86-2B16-4B22-887F-7079E54A8ED6.dita">Traditional
Symbian platform architecture</xref></p></li>
<li><p>the sub-panes in the status pane</p></li>
<li><p>pop-up windows, when a sense of layering is required</p>
</li>
</ul>
<p>The following code snippet is an example of the second phase construction
of a window-owning control:</p>
<codeblock id="GUID-234E4AC3-2FC8-4AD9-8B72-0FBA478E1D5A" xml:space="preserve">CMyControl::ConstructL()
    {
    CreateWindowL();    // This makes the control window- 
                        // owning
    SetRectL(ClientRect()); // This sets the control’s 
                            // size
    ActivateL();        // This must be called before
                        // the control can be drawn
    }
</codeblock>
<p><parmname>CEikAppUi::ClientRect()</parmname> returns the screen area
available to the application for drawing. This typically does not include
the space that is reserved for the status/control panes.</p>
<p>For more information, see <xref href="GUID-E244744F-4837-5B46-8E37-4666A28BF0B7.dita">The
run-time control hierarchy</xref></p>
</section>
<section id="GUID-13D754E5-EBCF-4058-B3B3-05505289953B"><title>Non-window-owning
controls</title>
<p>Non-window-owning controls typically cover only part of a window on
the display, and must be contained in window-owning controls. They are faster
and require fewer resources than window-owning controls.</p>
<p>Examples of non-window-owning controls include:</p>
<ul>
<li><p>command buttons</p></li>
<li><p>edit windows</p></li>
<li><p>labels</p></li>
</ul>
<p>Non-window-owning controls are assigned to window-owning controls by
calling <xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita#GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160/GUID-A39BAD7E-BAF2-3A4B-BE4F-2A86718EB190"><apiname>CCoeControl::SetContainerWindowL()</apiname></xref> when the control
is constructed.</p>
<p>For more information, see <xref href="GUID-E244744F-4837-5B46-8E37-4666A28BF0B7.dita">The
run-time control hierarchy</xref></p>
</section>
</conbody></concept>