×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    364

    Adding Custom Menu Through (DynInitMenuPaneL) to Form Problem

    Hi ,

    I tried to add a new Menu (Custom) to a form throught the procedure (DynInitMenuPaneL) , here is the syntax that I add it to (DynInitMenuPaneL):

    Inside the form (CPP) :
    #include <eikmobs.h>
    #include <eiklabel.h>
    #include <avkon.hrh>
    #include <aknappui.h>
    #include "EmailForm.h"
    #include "Sockets.hrh"


    void CEmailForm:ynInitMenuPaneL(TInt aResourceId,CEikMenuPane *aMenuPane)
    {
    CAknForm:ynInitMenuPaneL(aResourceId,aMenuPane);//r_emailform_menu R_EMAILFORM_MENU
    if (aResourceId==R_EMAILFORM_MENU)
    {
    aMenuPane->SetItemDimmed(EDownload,ETrue);//EForwad EFormExit
    aMenuPane->SetItemDimmed(EReplay,ETrue);
    aMenuPane->SetItemDimmed(EForwad,ETrue);
    aMenuPane->SetItemDimmed(EFormExit,ETrue);
    }
    }

    The (RSS) file:
    RESOURCE MENU_PANE r_emailform_menu
    {
    items =
    {
    MENU_ITEM {command = EDownload; txt = "Download Attachment";},
    MENU_ITEM {command = EReplay; txt = "Replay Message";},
    MENU_ITEM {command = EForwad; txt = "Forward Message";},
    MENU_ITEM {command = EFormExit; txt = "Exit";}
    };
    }

    On the (HRH) file:

    enum TEmailForm
    {
    EDownload = 1,
    EReplay,
    EForwad,
    EFormExit
    };

    I did all the required including on my Form (Cpp) file for the needed header (.h) and (hrh) file as It is written above , when I compile my application it gives the follwing compile errors:

    src\EmailForm.cpp(25) : error C2065: 'R_EMAILFORM_MENU' : undeclared identifier
    src\EmailForm.cpp(27) : error C2027: use of undefined type 'CEikMenuPane'
    C:\Symbian\7.0s\Series60_v20\\Epoc32\include\eikmobs.h(22) : see declaration of 'CEikMenuPane'
    src\EmailForm.cpp(27) : error C2227: left of '->SetItemDimmed' must point to class/struct/union
    src\EmailForm.cpp(28) : error C2027: use of undefined type 'CEikMenuPane'
    C:\Symbian\7.0s\Series60_v20\\Epoc32\include\eikmobs.h(22) : see declaration of 'CEikMenuPane'
    src\EmailForm.cpp(28) : error C2227: left of '->SetItemDimmed' must point to class/struct/union
    src\EmailForm.cpp(29) : error C2027: use of undefined type 'CEikMenuPane'
    C:\Symbian\7.0s\Series60_v20\\Epoc32\include\eikmobs.h(22) : see declaration of 'CEikMenuPane'
    src\EmailForm.cpp(29) : error C2227: left of '->SetItemDimmed' must point to class/struct/union
    src\EmailForm.cpp(30) : error C2027: use of undefined type 'CEikMenuPane'
    C:\Symbian\7.0s\Series60_v20\\Epoc32\include\eikmobs.h(22) : see declaration of 'CEikMenuPane'
    src\EmailForm.cpp(30) : error C2227: left of '->SetItemDimmed' must point to class/struct/union

    ('R_EMAILFORM_MENU') Is declared on (RSS) & (HRH) file with Command buttons what Is the problem exactly?

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Adding Custom Menu Through (DynInitMenuPaneL) to Form Problem

    As the error says "use of undefined type 'CEikMenuPane'"

    #include <EIKMENUP.H>

  3. #3
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    364

    Re: Adding Custom Menu Through (DynInitMenuPaneL) to Form Problem

    Quote Originally Posted by Paul.Todd
    As the error says "use of undefined type 'CEikMenuPane'"

    #include <EIKMENUP.H>
    Thanks paul For Your Help , I'm Out of town for today(the PC in my office) and I'll be back tommorow and I'll test and telling you the result please follow up my answer , Your help is really appreciated.

  4. #4
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    364

    Re: Adding Custom Menu Through (DynInitMenuPaneL) to Form Problem

    Quote Originally Posted by Paul.Todd
    As the error says "use of undefined type 'CEikMenuPane'"

    #include <EIKMENUP.H>
    Thanks Alot You'r right it works now.

Similar Threads

  1. Problem with sub menu
    By rbs in forum Symbian
    Replies: 28
    Last Post: 2007-01-06, 05:13
  2. Nokia 6600 - Problem with Form
    By frasene in forum Mobile Java General
    Replies: 0
    Last Post: 2005-12-23, 08:04
  3. Replies: 1
    Last Post: 2005-12-04, 12:01
  4. Replies: 1
    Last Post: 2005-09-08, 10:45
  5. form problem
    By nitrajpal in forum Symbian
    Replies: 4
    Last Post: 2005-07-01, 15:37

Posting Permissions

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