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

📄 simpledialog.cpp

📁 《基于symbian os 的手机开发与应用》 源代码 何伟 著
💻 CPP
字号:
/*
* ============================================================================
*  Name     : CDlgDialog from DlgDialog.h
*  Part of  : dlg
*  Created  : 2006-1-8 by 
*  Implementation notes:
*     Initial content was generated by Series 60 AppWizard.
*  Version  :
*  Copyright: 
* ============================================================================
*/

// INCLUDE FILES
#include    "SimpleDialog.h"

#include <eiklabel.h>  // for example label control
#include <avkon.hrh>
#include <aknappui.h>
#include <eikedwin.h>
#include <stringloader.h>
#include "dialog.hrh"
#include <dialog.rsg>
// ================= MEMBER FUNCTIONS =======================


// Destructor
CSimpleDialog::~CSimpleDialog()
    {
    }
//constructor
CSimpleDialog::CSimpleDialog()
{

}

// ---------------------------------------------------------
// CDlgDialog::OkToExitL(TInt aButtonId)
// called by framework when the softkey is pressed
// ---------------------------------------------------------
//
TBool CSimpleDialog::OkToExitL(TInt aButtonId)
{
    // Translate the button presses into commands for the appui & current
    // view to handle
    if ( aButtonId == EAknSoftkeyOk )
        {
        CEikEdwin* editor=static_cast<CEikEdwin*>(ControlOrNull(EConfirmaionNoteDlgCIdEditor));
		if(editor)
		{
			editor->GetText(iName);
        }
       }
    
    return ETrue;
}

// ---------------------------------------------------------
// CDlgDialog::PreLayoutDynInitL();
// called by framework before dialog is shown 
// ---------------------------------------------------------
//
void CSimpleDialog::PreLayoutDynInitL()
    {
     CEikLabel* label=static_cast<CEikLabel*>(ControlOrNull(EConfirmationNoteDlgCIdFileName));
	 if(label)
	 {
		 HBufC* labelText=StringLoader::LoadLC(R_LABEL_TEXT);
		 label->SetTextL(*labelText);
		 CleanupStack::PopAndDestroy(labelText);
	 }
    }

TBool CSimpleDialog::RunDlgLD()
{
	CSimpleDialog* dialog=new(ELeave) CSimpleDialog();
	return dialog->ExecuteLD(R_DIALOG_EDIT_DIALOG);
//	return dialog->ExecuteLD(R_DIALOG_MUTIPLE_DLG);
//	return ETrue;
}


// End of File

⌨️ 快捷键说明

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