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)