Discussion Board
URGENT:Compile error in infrared '.h' file
2002-05-29, 13:45
#1
Super Contributor
I have implemented the 'Using CIrListenAppUi' - 'Adding a CIrListenAppUi to your application'
into the helloworld app. Now when I compile my 'AppUi' file I get the error
\Symbian\6.0\NokiaCPP\EPOC32\INCLUDE\irlistenui.h(11) : error C2236: unexpected 'class' 'CEikMenuPane'
which is the forward class declaration.
What is the real problem here???
Many thanks
Code -
Helloworld header
...
#include <irlistenui.h> /* Infra-red listener */
#include <eikmenub.h> /* CEikMenuBar */
class CExampleAppUi : public CEikAppUi
{
public:
void ConstructL();
~CExampleAppUi();
private:
void HandleCommandL(TInt aCommand);
void DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane);
private:
CCoeControl* iAppView;
CIrListenAppUi* iIrListenAppUi;
};
AppUi CPP
#include "HelloWorld.h"
void CExampleAppUi::ConstructL()
{
// BaseConstructL() completes the UI framework's
// construction of the App UI.
BaseConstructL();
// Create the single application view in which to
// draw the text "Hello World!", passing into it
// the rectangle available to it.
iAppView = CExampleAppView::NewL(ClientRect());
iIrListenAppUi = CIrListenAppUi::NewL(KIrListenCmdId,
iEikonEnv->AppUiFactory()->MenuBar()->HotKeyTable());
}
CExampleAppUi::~CExampleAppUi()
{
delete iAppView;
delete iIrListenAppUi;
}
void CExampleAppUi::HandleCommandL(TInt aCommand)
{
// UI environment
CEikonEnv* eikonEnv=CEikonEnv::Static();
switch (aCommand)
{
case KIrListenCmdId:
{
iIrListenAppUi->ToggleListeningL();
break;
}
}
}
void CExampleAppUi::DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane)
{
switch (aMenuId)
{
case R_EXAMPLE_TOOLS_MENU:
{
iIrListenAppUi->DisplayIrListenMenuItemL(*aMenuPane, aMenuPane->MenuItemIndex(KIrListenCmdId));
break;
}
}
}
Helloworld.hrh
enum TInfraredCommands
{
KIrListenCmdId
}
Posted by Steve Willett, steve.willett@neuvoice.com
on January 15, 2002 at 14:19
RE: URGENT:Compile error in infrared '.h' file
2002-05-29, 13:45
#2
Super Contributor
Posted by Robert Kacirek, robert.kacirek@uniweb.cz
on January 16, 2002 at 15:12
Try include file "eikmenup.h". There is declared class CEikMenuPane in this file.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules