Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Using CAknWaitDialog without callback
The following article describes how to use a CAknWaitDialog without using callbacks. It shows how to create the wait dialog, how to handle the cancel button and how to do away with the dialog when the process has finished.
Header File (.h)
Declare CAknWaitDialog* iWaitDialog; in your class. There's no need to derive the class from MProgressDialogCallback.
- Creation and handling Cancel
iWaitDialog = new(ELeave)CAknWaitDialog( (REINTERPRET_CAST(CEikDialog**,&iWaitDialog)));//create instance
//Cancel has been pressed iWaitDialog will be destroyed because of LD
NOTE: If the dialog is used as a modal, only then RunLD returns 0 when the
dialog is dismissed and if the dialog is not used as a modal then it returns
- Dismiss wait dialog (on the event that the process has finished)