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

📄 funhelpcontainer.cpp.bak

📁 symbian系统上的记事本程序
💻 BAK
字号:
/*
* ============================================================================
*  Name     : CFunFunHelpContainer from CCoeControl, MCoeControlObserver
*  Part of  : Hello
*  Copyright (c) 2003 Nokia. All rights reserved.
* ============================================================================
*/

// INCLUDE FILES


#include <EveryDay.rsg>
#include "EveryDay.hrh"
#include "FunHelpContainer.h"
#include "Common.h"
#include <eikedwin.h>
#include "s32file.h"

#include <aknnotewrappers.h> 
#include <aknviewappui.h>
#include <avkon.hrh>


// ================= MEMBER FUNCTIONS =======================

// C++ default constructor can NOT contain any code, that
// might leave.
//
CFunFunHelpContainer::CFunFunHelpContainer()
{
	m_pFunFunHelp=NULL;
}

// EPOC default constructor can leave.
void CFunFunHelpContainer::ConstructL(const TRect& aRect)
{
    CreateWindowL();
// 	HBufC* htemp = HBufC::NewL(256);
// 	TPtr16 temp = htemp->Des();
// 	ReadFunFunHelpL(temp);
//	HBufC* hbuf=HBufC::NewL(256);
	TBuf<256> hbuf;
	CEikonEnv::Static()->ReadResource(hbuf, R_QTN_HELP_CONTENT_A);
	m_pFunFunHelp = new(ELeave) CEikEdwin;
	m_pFunFunHelp->SetContainerWindowL(*this);
	m_pFunFunHelp->ConstructL(EAknEditorFlagDefault, 10, 10, 1);
	m_pFunFunHelp->SetExtent(TPoint(0,0), TSize(176,144));
	m_pFunFunHelp->SetTextL(&hbuf);

	
	
    SetRect(aRect);
    ActivateL();
}



// Destructor
CFunFunHelpContainer::~CFunFunHelpContainer()
{
	MEM_FREE(m_pFunFunHelp);
}

// ---------------------------------------------------------
// CFunFunHelpContainer::FocusTo(TInt aCommand)
// Change foccused control.
// (other items were commented in a header).
// ---------------------------------------------------------
//

void CFunFunHelpContainer::FocusTo(TInt aCommand)
{
}

// ---------------------------------------------------------
// CFunFunHelpContainer::SizeChanged()
// Called by framework when the view size is changed
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CFunFunHelpContainer::SizeChanged()
{
}

// ---------------------------------------------------------
// CFunFunHelpContainer::CountComponentControls() const
// (other items were commented in a header).
// ---------------------------------------------------------
//
TInt CFunFunHelpContainer::CountComponentControls() const
{
	return 1; // return nbr of controls inside this container
}

// ---------------------------------------------------------
// CFunFunHelpContainer::ComponentControl(TInt aIndex) const
// (other items were commented in a header).
// ---------------------------------------------------------
//
CCoeControl* CFunFunHelpContainer::ComponentControl(TInt aIndex) const
{
	return m_pFunFunHelp;
}

// ---------------------------------------------------------
// CFunFunHelpContainer::Draw(const TRect& aRect) const
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CFunFunHelpContainer::Draw(const TRect& aRect) const
{
    CWindowGc& gc = SystemGc();
    gc.SetPenStyle(CGraphicsContext::ENullPen);
    gc.SetBrushColor(KRgbWhite);
    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    gc.DrawRect(aRect);
}

// ---------------------------------------------------------
// CFunFunHelpContainer::OfferKeyEventL(...)
// Notify key events to editors.
// (other items were commented in a header).
// ---------------------------------------------------------
//
TKeyResponse CFunFunHelpContainer::OfferKeyEventL(
											 const TKeyEvent& aKeyEvent, TEventCode aType)
{
	return EKeyWasNotConsumed;
}


// ---------------------------------------------------------
// CFunFunHelpContainer::HandleControlEventL(
//     CCoeControl* aControl,TCoeEvent aEventType)
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CFunFunHelpContainer::HandleControlEventL(
										  CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
{
}
// 
// void CFunFunHelpContainer::ReadFunFunHelpL(TPtr16 ptemp)
// {
// 	_LIT(KFileInfo, "C:\\FunFunHelp.abc");
// 	RFs& Fession = CEikonEnv::Static()->FsSession();
// 	RFileReadStream ReadFunFunHelpStream;
// 
// 	if(KErrNone != ReadFunFunHelpStream.Open(Fession, KFileInfo, EFileRead))
// 	{
// 		return ;
// 	}
// 	
// 	ReadFunFunHelpStream.PushL();
// 
// 	TInt32 num=0;
// 	num=ReadFunFunHelpStream.ReadReal32L();
//  	
// // 	HBufC* pFunFunHelp= HBufC::NewL(num);
// // 	ptemp = pFunFunHelp->Des();
// 
// 
// 		ReadFunFunHelpStream >> ptemp;		
// 
// 	
// 	ReadFunFunHelpStream.Pop();
// 	ReadFunFunHelpStream.Release();
// 	
// }

// End of File  

⌨️ 快捷键说明

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