Symbian一个活动对象的测试例子
2010-10-20 08:00:45 来源:WEB开发网*/
void HandleCommandL(TInt aCommand);
/**
* From CEikAppUi, handles key events.
* @param aKeyEvent Event to handled.
* @param aType Type of the key event.
* @return Response code (EKeyWasConsumed, EKeyWasNotConsumed).
*/
virtual TKeyResponse HandleKeyEventL(
const TKeyEvent& aKeyEvent,TEventCode aType);
private: //Data
CActiveTest2Container* iAppContainer;
CActiveTest2NewClass* iTest2NewClass;
};
#endif
CActiveTest2AppUi from ActiveTest2Appui.cpp
/*
============================================================================
Name : CActiveTest2AppUi from ActiveTest2Appui.cpp
Author :
Version :
Copyright : Your copyright notice
Description : CActiveTest2AppUi implementation
============================================================================
*/
// INCLUDE FILES
#include "ActiveTest2Appui.h"
#include "ActiveTest2Container.h"
#include
#include "ActiveTest2.hrh"
#include "ActiveTest2NewClass.h"
#include
#include
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CActiveTest2AppUi::ConstructL()
//
// ----------------------------------------------------------
//
void CActiveTest2AppUi::ConstructL()
{
BaseConstructL();
iTest2NewClass = CActiveTest2NewClass::NewL();
iAppContainer = new (ELeave) CActiveTest2Container;
iAppContainer->SetMopParent( this );
iAppContainer->ConstructL( ClientRect() );
AddToStackL( iAppContainer );
赞助商链接