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

📄 ldmcm8appui.cpp

📁 symbian控件的利用
💻 CPP
字号:
/* Copyright (c) 2008, Nokia. All rights reserved */

#include <avkon.hrh>
#include <aknnotewrappers.h> 
#include <LDMCM8.mbg>

#include "LDMCM8.pan"
#include "LDMCM8AppUi.h"
#include "RegistView.h"
#include "LoginView.h"
#include "LDMCM8.hrh"
#include "LDMCM8Application.h"

void CLDMCM8AppUi::ConstructL()
{
    BaseConstructL(EAknEnableSkin);

	iAppView = CRegistView::NEWL();
	AddViewL(iAppView);

	iAppView1 = CLoginView::NEWL();
	AddViewL(iAppView1);
	
	//     iAppView = CLDMCM8AppView::NewL(ClientRect());    
	//     AddToStackL(iAppView);
}

CLDMCM8AppUi::CLDMCM8AppUi()                              
{
    // add any construction that cannot leave here
}

CLDMCM8AppUi::~CLDMCM8AppUi()
{
	//     if (iAppView)
	//         {
	//         iEikonEnv->RemoveFromStack(iAppView);
	//         delete iAppView;
	//         iAppView = NULL;
	//         }
}

void CLDMCM8AppUi::HandleCommandL(TInt aCommand)
{
    switch(aCommand)
	{
	case EEikCmdExit:
	case EAknSoftkeyExit:
		Exit();
		break;
		
	case ELDMCM8CmdRegistLog:
			ActivateLocalViewL(KViewId2);
		break;
	case ELDMCM8CmdLoginReturn:
			ActivateLocalViewL(KViewId1);		
		break;
	default:
		Panic(ELDMCM8BasicUi);
		break;
	}
}




CGulIcon* CLDMCM8AppUi::LoadGraphicsL(TInt aType)
{
	TBuf<KMaxPath> pathAppMbm;
#ifdef __WINS__
	pathAppMbm.Copy(_L("z:\\system\\apps\\myhello\\myhello.mbm"));
#else
	TFileName appFullName;
 	appFullName = Application()->AppFullName();
 	TParsePtr parse(appFullName);
	pathAppMbm.Copy(parse.DriveAndPath());
	pathAppMbm.Append(_L("myhello.mbm"));
#endif
	switch(aType)
	{
	case 0:
		return iEikonEnv->CreateIconL(pathAppMbm, EMbmLdmcm8Loginicon, EMbmLdmcm8Loginiconm);
	case 1:
		return iEikonEnv->CreateIconL(pathAppMbm, EMbmLdmcm8Registicon, EMbmLdmcm8Registiconm);
	default:
		return NULL;
	}
}


void CLDMCM8AppUi::GetAppPath(TDes& aPath)
{
	TFileName appFullName;
 	appFullName = Application()->AppFullName();
 	TParsePtr parse(appFullName);
	aPath.Copy(parse.DriveAndPath());
}

⌨️ 快捷键说明

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