You Are Here:

Community: Wiki

This page was last modified on 12 December 2007, at 07:06.

Using CAknWaitDialog without callback

From Forum Nokia Wiki

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.


Code (.cpp)

  • Creation and handling Cancel
iWaitDialog = new(ELeave)CAknWaitDialog( (REINTERPRET_CAST(CEikDialog**,&iWaitDialog)));//create instance
 
iWaitDialog->PrepareLC(R_MYWAITDIALOG);
iWaitDialog->SetTextL(_L("Connecting..."));
if(iWaitDialog->RunLD()==0)
{
//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
EAknSoftkeyDone.
*/


  • Dismiss wait dialog (on the event that the process has finished)
void CMyClass::MyProcessIsOver()
{
if(iWaitDialog)
iWaitDialog->ProcessFinishedL();
}

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fE25E455E25A6E2582E25E454E25BE44E2595E25E455E259CE25A8E25E456E2594E25B6E25E454E25BBE25B6E25E457E25AE45E25B1E25E455E2588E259BE25E455E25BBE25BAE25E457E259FE25AE44E25E454E25BFE25A1X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZseriesE5f60Q qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qfnZuserE5ftagQSxs60X qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ