diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-A168E5EB-4CF7-4B74-B67C-EDFD5378C5BF.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-A168E5EB-4CF7-4B74-B67C-EDFD5378C5BF.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,37 @@ + + + + + +Accessing +toolbar extension items +

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 ) + { + ... + } + } + } + } + +
\ No newline at end of file