×

Discussion Board

Results 1 to 4 of 4

Thread: Exit soft key??

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    34

    Exit soft key??

    Hi All

    I want to overide the behavior of Exit Softkey( for example querying the user before exiting) in a dialog.How can we do this?
    I tried something like this but its not working. It works as before exiting from the dialog without querying etc
    RESOURCE DIALOG r_dialog
    {
    title = "UniMsg PIM-Preferences";
    buttons=R_AVKON_SOFTKEYS_OPTIONS_EXIT;
    flags=EEikDialogFlagCbaButtons|EEikDialogFlagNoTitleBar|EEikDialogFlagFillAppClientRect|EEikDialogFlagNotifyEsc;
    items=// other controls like edwin defined here
    }
    Redefined the Options menu using a menu bar resource

    void CDialog::ProcessCommandL(TInt aCommandId)
    {

    switch(aCommandId)
    {

    case ECmd1:
    case ECmd2:// do something


    case EAknSoftkeyExit:
    //code for querying the user before exiting
    break;
    case EAknCmdExit:
    User::Exit(1);
    }

    }


    How can we achieve this?
    waiting for a reply

  2. #2
    Regular Contributor
    Join Date
    Feb 2005
    Location
    Glasgow
    Posts
    106

    Re: Exit soft key??

    Hi,

    In your switch block, include the following:

    case EEikCmdExit:
    case EAknSoftkeyExit:
    {
    // do something here

    // quit application
    Exit();
    }

    michael
    --

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    2

    Re: Exit soft key??

    I did what u hv suggested but its thorwing compile time error

    "Unkonwn identifier"

    Dee

  4. #4
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Braunschweig, Germany
    Posts
    345

    Re: Exit soft key??

    Searching in the helpfile revealed that you have to include avkon.hrh to get the definitions for the Akn Softkeys.

    Bernd

Similar Threads

  1. UNDESIRED Exit command key.
    By tektronic in forum Mobile Java General
    Replies: 4
    Last Post: 2005-05-13, 18:27
  2. Dynamic change of soft key labels
    By juliaf in forum Symbian User Interface
    Replies: 22
    Last Post: 2005-01-22, 09:05
  3. Simulating left soft key, Pls look in to my code
    By alokkumarsingh in forum Symbian
    Replies: 4
    Last Post: 2004-07-05, 13:47
  4. Replies: 1
    Last Post: 2004-06-28, 09:57
  5. soft key bug in 3410 JVM
    By jeep_ in forum Mobile Java General
    Replies: 1
    Last Post: 2002-07-03, 11:25

Posting Permissions

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