CAknGlobalConfirmationQuery Uses notification framework to show a global confirmation query.
Usage: Create an active object, start it and pass its TRequestStatus as a parameter to ShowConfirmationQueryL. After the user presses a softkey, the request status will hold the id of the pressed softkey. E.g. If the user selected Cancel, the request status will hold -1.
Example 1. Show the global confirmation query: if ( iConfObserver ) { iConfObserver->Cancel(); delete iConfObserver; } iConfObserver = new(ELeave) CGlobalConfirmationObserver(iEikonEnv); iConfObserver->Start(); iGlobalConfirmationQuery->ShowMsgQueryL(iConfObserver->iStatus, iPrompt, R_AVKON_SOFTKEYS_OK_CANCEL, R_QUERY_NOTE_ANIMATION);
Example 2. Get and handle the result in active object. void CMyActiveObject::RunL() { TBuf<120> msg = _L("Received: "); msg.AppendNum( iStatus.Int() ); iEnv->InfoMsg(msg); Cancel(); }
Example 3. Update the query (softkeys) iGlobalConfirmationQuery->UpdateConfirmationQuery( R_AVKON_SOFTKEYS_BACK );
NOTE !!! All descriptors passed as parameters need to be class members, i.e. they cannot be local variables of a method. That is because they need to exist when server gets the message.