Like with the actual toolbar, each control in the toolbar extension should have a unique ID. You can access the toolbar extension controls from your application using these IDs.
The example below shows how to access toolbar extension items using the contol ID.
void CMyAppView::DoSomethingToExtensionButton() { CAknToolbar* toolbar = Toolbar(); if ( toolbar ) { CAknToolbarExtension* toolbarExtension = toolbar->ToolbarExtension(); if ( toolbarExtension ) { CAknButton* button = static_cast<CAknButton*>( toolbarExtension->ControlOrNull( KExtensionButtonId ) ); if ( button ) { ... } } } }
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.