myhelloappui.cpp
来自「symbian中讲述的一个有关换menubar的例子」· C++ 代码 · 共 80 行
CPP
80 行
/* Copyright (c) 2008, Nokia. All rights reserved */
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include "MyHello.pan"
#include "MyHelloAppUi.h"
//#include "MyHelloAppView.h"
#include "Helloview.h"
#include "WorldView.h"
#include "MyHello.hrh"
#include "MyHelloApplication.h" //for CEikApplication
void CMyHelloAppUi::ConstructL()
{
BaseConstructL(EAknEnableSkin);
m_pHelloView = CHelloView::NewL();
AddViewL(m_pHelloView);
m_pWorldView = CWorldView::NewL();
AddViewL(m_pWorldView);
SetDefaultViewL(*m_pHelloView);
// iAppView = CMyHelloAppView::NewL(ClientRect());
// AddToStackL(iAppView);
}
CMyHelloAppUi::CMyHelloAppUi()
{
// add any construction that cannot leave here
}
CMyHelloAppUi::~CMyHelloAppUi()
{
}
void CMyHelloAppUi::HandleCommandL(TInt aCommand)
{
switch(aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case EMyHelloCommand1:
{
// _LIT(message,"Command 1");
// CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
// informationNote->ExecuteLD(message);
}
break;
case EMyHelloCommandToWorldView:
{
ActivateLocalViewL(KViewId2);
}
break;
default:
Panic(EMyHelloBasicUi);
break;
}
}
//#include "MyHelloApplication.h" //for CEikApplication
void CMyHelloAppUi::GetAppPath(TDes& aPath)
{
TFileName appFullName;
appFullName = Application()->AppFullName();
TParsePtr parse(appFullName);
aPath.Copy(parse.DriveAndPath());
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?