diff -r 000000000000 -r 89d6a7a84779 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 Thu Jan 21 18:18:20 2010 +0000 @@ -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