Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2008

    adding menu to forms problem??

    plz help i m new to symbian... i have disbled the default menu and now i m trying to add menu to it and errors are coming up plz have a look at code...
    i have consulted nokia document "S60_Platform_Avkon_UI_Resources_Forms_v1_1_en " and many other posts but unable to find error. advice from expert is in need at this stage

    please guide me where i do need to make changes,, plz help i m stuck with it


    2nd phase constructor//////

    COpponentFormForm* COpponentFormForm::NewL(TOpponentFormOpponent& aOpponent)
    COpponentFormForm* self = new (ELeave) COpponentFormForm(aOpponent);
    return self;

    //////////default menu to over write

    void COpponentFormForm::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)

    if (aResourceId == R_AVKON_FORM_MENUPANE)
    aMenuPane->SetItemDimmed(EAknFormCmdLabel, ETrue);
    aMenuPane->SetItemDimmed(EAknFormCmdAdd, ETrue);
    aMenuPane->SetItemDimmed(EAknFormCmdDelete, ETrue);
    aMenuPane->SetItemDimmed(EAknFormCmdSave, ETrue);


    ///////////////.RSS resource file////////////////////////

    RESOURCE MENU_BAR r_my_form_menubar
    titles =
    menu_pane = r_my_form_menu;
    RESOURCE MENU_PANE r_my_form_menu

    ////////////HEADER FILE//////////////////////

    class COpponentFormForm : public CAknForm
    public: // Constructor

    static COpponentFormForm* NewL(TOpponentFormOpponent& aOpponent );

    private: // from CAknForm

    void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane );

    TBool SaveFormDataL();

    void DoNotSaveFormDataL();

    void PreLayoutDynInitL();

    // Actions on exiting form
    //TBool OkToExitL(TInt aButtonId);

    private: // Constructor

    COpponentFormForm (TOpponentFormOpponent& aOpponent ) : iOpponent(aOpponent){};

    private: // members

    void LoadFormValuesFromDataL();

    private: //data
    TOpponentFormOpponent& iOpponent;

    #endif // #ifndef OPPONENTFORMFORM_H

    // End of File

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Budapest, Hungary

    Re: adding menu to forms problem??

    Quote Originally Posted by xahid2k View Post
    Although I have never tried it in action, my guess would be that CEikMenuPane::AddMenuItemsL expects a MENU_PANE resource. So try R_MY_FORM_MENU

  3. #3
    Registered User
    Join Date
    Dec 2008

    Re: adding menu to forms problem??

    Thanks for your message. i have tried your opionion but it didnt work .. any other suggestions plz... i can send you the project if u want to have a look.
    Last edited by xahid2k; 2009-07-12 at 09:50.

Similar Threads

  1. Problem with sub menu using LIST BOX
    By rbs in forum Symbian User Interface
    Replies: 8
    Last Post: 2011-08-23, 18:32
  2. adding menu item in Inbox using MTM
    By gpalvia in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-09-17, 14:00
  3. PIM API adding new contacts problem
    By hoppelmoppel in forum Mobile Java General
    Replies: 3
    Last Post: 2007-04-22, 17:12
  4. Adding items to menu gives "Program closed"
    By mozgido in forum Symbian
    Replies: 2
    Last Post: 2007-03-06, 17:59
  5. Replies: 3
    Last Post: 2007-02-16, 07:47

Posting Permissions

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