?? funhelpcontainer.cpp.bak
字號(hào):
/*
* ============================================================================
* 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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -