diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-E1A2872E-6E8D-4C02-B3C0-23213FD56106.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-E1A2872E-6E8D-4C02-B3C0-23213FD56106.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,50 @@ + + + + + +Handling +button events +

Use the MCoeControlObserver observer interface to observe +button events. Set the button container to be its observer.

+

For more information on events, see Event +handling.

+void CMyAppContainer::HandleControlEventL( CCoeControl* aControl, + TCoeEvent aEventType ) + { + switch ( aEventType ) + { + +// Button state changed (button was pressed) + + case EEventStateChanged: + … + break; + +// Button is pressed for a long time (in case of +// a KAknButtonReportOnLongPress flagged button) + + case CAknButton::ELongPressEvent: + … + break; + +// Button long press ended (in case of +// a KAknButtonReportOnLongPress flagged button) + + case CAknButton::ELongPressEndedEvent: + … + break; + + default: + break; + } + } + + +
\ No newline at end of file