CAknMessageQueryDialog

Login to reply to this topic.
Wed, 2005-04-13 07:38
Joined: 2004-05-21
Forum posts: 48
Hi,

Can anyone show me the way where I can know when my CAknMessageQueryDialog is dismissed.

It doesnt have OkTOExit() method. Then whats the alternative for that.

Any code fragments will be a great help.

Thanx in advance...

Dushyant Gaur
Software Specialist,
Kodiak Networks,
No 401 Prestige Sigma, 4th Floor
3 Vittal Mallya Road
Bangalore - 560 001
India


Wed, 2005-04-13 12:01
Joined: 2004-05-24
Forum posts: 982
Re: CAknMessageQueryDialog
Quote from: dushyant_gaur
Hi,

Can anyone show me the way where I can know when my CAknMessageQueryDialog is dismissed.

It doesnt have OkTOExit() method. Then whats the alternative for that.

Any code fragments will be a great help.

Thanx in advance...

What exactly are you trying to ask? Are you extend the CAknMessageQuesryDialog? Or are you using a CAknMessageQuesryDialog? If second case check for RunLD

pirosl

Wed, 2005-04-13 13:17
Joined: 2004-05-21
Forum posts: 48
CAknMessageQueryDialog
I have a class derived from CAknQueryDialog and which has a member of type CAknMessageQueryDialog and an implementation of OkToExitL.

class CKnGrpNotificationDialog: public CAknQueryDialog
{
       CAknMessageQueryDialog* dlg;
       virtual TBool OkToExitL(TInt    aButtonId) ;
};


Now in any method of this class I try to create an instance of CAknMessageQueryDialog and show it (following code).

CKnGrpNotificationDialog::ExecuteLD(TInt aResourceId)
{
   dlg = CAknMessageQueryDialog::NewL(iMsg);   
   dlg->PrepareLC(aResourceId);
   return dlg->RunLD();
}


But when the dialog is dismissed, ideally OkToExit method should be called. But its not been called and I have no way to know which button on the dialog is cliked by the user.

The one way of knowing the button id is the return value of dlg->RunLD(), but it will give me correct value only if it is a wait dialog. What if it is a Modeless dialog? In that case RunLD() will return immediately and then I cant get the value of button clicked.

Dushyant Gaur
Software Specialist,
Kodiak Networks,
No 401 Prestige Sigma, 4th Floor
3 Vittal Mallya Road
Bangalore - 560 001
India

Wed, 2005-04-13 18:41
Joined: 2004-05-24
Forum posts: 982
CAknMessageQueryDialog
Shouldn't be

Code:
class CKnGrpNotificationDialog: public CAknQueryDialog
{
   CAknMessageQueryDialog* dlg;
protected: //from CAknQuesryDialog
   TBool OkToExitL(TInt aButtonId) ;
};
 

?

Where is your OkToExit(TInt aButtonId) implementation?

pirosl

Wed, 2005-04-13 21:52
Joined: 2004-12-28
Forum posts: 6
CAknMessageQueryDialog
Try to implement follow method:

void CAknDialog::ProcessCommandL(  TInt    aCommandId  ) virtual
  • Login to reply to this topic.