×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    How to close pop up dialog programmatically

    I am displaying a pop up dialog using the following code
    CAboutDialog* dialog = new(ELeave) CAboutDialog();
    dialog->SetMopParent(this);
    dialog->ExecuteLD(R_ABOUT_BOX);

    //CAboutDialog is derived class of CAknDialog

    And dialog is getting displyed well.

    How I know whether my dialog is getting displayed or not programmatically and if dialog is getting displayed how to close it programmatically

    I tried to know whether dialog is getting displayed or not using IsDisplayingMenuOrDialog() , but it is giving false.

    Any idea??

    SSS

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1
    I found a solution for closing the dialog. It works, but I am quite suspicious if it is the correct way. What I do is that I delete the dialog from a menu command handler (not dialog's own notification - might work there as well):

    delete theModalDialog;

    It seems that ExecutLD notices this and won't do double deletion.

    THE RIGHT WAY (just found it):

    call TryExitL(...)
    Last edited by petteri@timehouse.fi; 2005-08-10 at 09:51.

  3. #3
    Registered User
    Join Date
    Jul 2006
    Posts
    9

    Smile Re: How to close pop up dialog programmatically

    try this code plz:
    Case EKeyOK:
    ExitSleepingDialog();
    break;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×