⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testmtmsappui.cpp

📁 本例是SYMBIAN C++一个创建短信的例子
💻 CPP
字号:
/*
 ============================================================================
 Name		: TestMtmsAppUi.cpp
 Author	  : Tomken
 Copyright   : (C) 2008-2009
 Description : CTestMtmsAppUi implementation
 ============================================================================
 */

// INCLUDE FILES
#include <avkon.hrh>
#include <aknmessagequerydialog.h>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <f32file.h>
#include <s32file.h>
#include <e32math.h>

#ifdef EKA2
#include <TestMtms_0xEC3D5D7F.rsg>
#else
#include <TestMtms.rsg>
#endif

#include "TestMtms.hrh"
#include "TestMtms.pan"
#include "TestMtmsApplication.h"
#include "TestMtmsAppUi.h"
#include "TestMtmsAppView.h"
#include "NqContactEngine.h"
#include "ProPacketFileImage.h"
#include "NqPinyinConverter.h"
#include "FloatingWindow.h"

#include <aknutils.h> 
#include <aknnotewrappers.h>
#include <AknNotifyStd.h>

#include <avkon.mbg>
#include <akniconutils.h> 

#include <APGWGNAM.H>
#include <W32STD.H>
#include "Log.h"

#include <CPhCltDialer.h>
#include <BAUTILS.H>
#include <CPhCltExtPhoneBase.h>
#include <TPhCltExtPhoneDialData.h>
#include <PhCltTypes.h>
#include <PbkFields.hrh>

#include "CallStack.h"

#ifdef CALLSTACK_DEBUG
RFileLogger iNqLogger;
#endif

void CTestMtmsAppUi::ConstructL()
{
	// Initialise app UI with standard value.
	BaseConstructL(CAknAppUi::EAknEnableSkin);

	// Create view object
	iAppView = CTestMtmsAppView::NewL(ClientRect() );
	AddToStackL(iAppView);
	
#ifdef CALLSTACK_DEBUG
	User::LeaveIfError(iNqLogger.Connect());
	iNqLogger.CreateLog(_KTestLogDir, _KTestLogFile, EFileLoggingModeOverwrite);
#endif
}

CTestMtmsAppUi::CTestMtmsAppUi()
{
}

CTestMtmsAppUi::~CTestMtmsAppUi()
{
	if (iAppView)
	{
		RemoveFromStack( iAppView );
		delete iAppView;
		iAppView = NULL;
	}
	
#ifdef CALLSTACK_DEBUG
	iNqLogger.Close();
#endif
}


void CTestMtmsAppUi::HandleCommandL(TInt aCommand)
	{
	switch (aCommand)
		{
		case EEikCmdExit:
		case EAknSoftkeyExit:
			Exit();
			break;

		case ECommand1:
			{
			}
			break;
		case ECommand2:
			{
			}
			break;
		case EHelp:
			{
				CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
				dlg->PrepareLC( R_MESSAGE_QUERY );
				dlg->SetMessageTextL(_L("AAbbbccddd"));
				dlg->QueryHeading()->SetTextL(_L("Connect info"));
				dlg->RunLD();

			}
			break;
		case EAbout:
			{

			CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
			dlg->PrepareLC(R_ABOUT_QUERY_DIALOG);
			HBufC* title = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TITLE);
			dlg->QueryHeading()->SetTextL(*title);
			CleanupStack::PopAndDestroy(); //title
			HBufC* msg = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TEXT);
			dlg->SetMessageTextL(*msg);
			CleanupStack::PopAndDestroy(); //msg
			dlg->RunLD();
			}
			break;
		default:
			iAppView->HandleCommandL(aCommand);
			break;
		}
	}


void CTestMtmsAppUi::HandleForegroundEventL( TBool aForeground )
{

	CAknAppUi::HandleForegroundEventL(aForeground);
}
void CTestMtmsAppUi::HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination)
{
	CAknAppUi::HandleWsEventL(aEvent, aDestination);
}

CTestMtmsAppUi* CTestMtmsAppUi::GetPicaAppUi()
{
	CEikAppUi* pAppUi = CEikonEnv::Static()->EikAppUi();
	while(pAppUi->ContainerAppUi())
	{
		pAppUi = pAppUi->ContainerAppUi();
	}

	return (CTestMtmsAppUi*)pAppUi;
} 

// End of File

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -