myhelloappui.cpp
来自「symbian中讲述的一个有关设置title和icon的例子」· C++ 代码 · 共 75 行
CPP
75 行
/* 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"
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()
{
// if (iAppView)
// {
// iEikonEnv->RemoveFromStack(iAppView);
// delete iAppView;
// iAppView = NULL;
// }
}
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;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?