Symbian3/SDK/Source/GUID-6FD4E7A4-D215-4CFB-BC7A-23065DE95C5C.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 8 ae94777fff8f
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?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>