CAknGlobalMsgQuery Uses notification framework to show a global message query.
Usage: Create an active object, start it and pass its TRequestStatus as a parameter to ShowMsgQueryL. 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 message query: if ( iListObserver ) { iListObserver->Cancel(); delete iListObserver; } iMsgObserver = new(ELeave) CGlobalMsgObserver(iEikonEnv); iMsgObserver->Start(); iGlobalMsgQuery->ShowMsgQueryL(iMsgObserver->iStatus, iMsgText, R_AVKON_SOFTKEYS_OK_CANCEL, iMsgHeader, iHeaderImageFile, EImageId, EMaskId );
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) iGlobalMsgQuery->UpdateMsgQuery( 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.
Set delay after which query will be removed from screen after message is completed Can be used to get around problems with global query exit and CrossCheckForeground probs.
Set delay after which query will be removed from screen after message is completed Can be used to get around problems with global query exit and CrossCheckForeground probs.
Must be called before ShowMsgQueryL in order to be effective
Parameters:
aDelay
Time in microsecond, after which query will be removed from display