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?

ynInitMenuPaneL(TInt aResourceId,CEikMenuPane *aMenuPane)
Reply With Quote

