Symbian3/SDK/Source/GUID-6FD4E7A4-D215-4CFB-BC7A-23065DE95C5C.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 task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-6FD4E7A4-D215-4CFB-BC7A-23065DE95C5C" xml:lang="en"><title>Add
a view to the control stack</title><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context> <p>To enable a view to receive key events, add a view to the control
stack using the following method. This method adds a control into the application
UI's control stack.</p><note> Ensure that the view is constructed before adding
it to the control stack. </note><codeblock xml:space="preserve">IMPORT_C void AddToStackL( const MCoeView&amp; aView, 
                           CCoeControl *aControl, 
                           TInt aPriority=ECoeStackPriorityDefault, 
                           TInt aStackingFlags=ECoeStackFlagStandard );</codeblock><p>The
following code snippet shows adding a view to the control stack:</p><codeblock xml:space="preserve">/**  
Add aControl to Cone's control stack with priority aPriority and behaviour aStackingFlags.\n 
*/
void CNewView::AddToStackL( CCoeControl* aControl,
                            TInt aPriority,
                            TInt aStackingFlags )
    {
    iCCoeAppUi.AddToStackL( *this, aControl, aPriority, aStackingFlags);
    }</codeblock><p> For more information on writing control stack, see <xref href="GUID-B84FA223-3DFD-58C5-8CEF-C5AA73AA6290.dita">How to write controls</xref>.</p></context>
</taskbody></task>