📄 mydownform.cpp
字号:
/*
============================================================================
Name : CMyDownForm.cpp
Author : bianbian
Version :
Copyright : Troy
Description : CMyDownForm implementation
============================================================================
*/
#include "MyDownForm.h"
#include "MyNotepaper.h"
void CMyDownForm::ConstructL(const TRect& aRect)
{
iFormRect = aRect;
CreateWindowL();
iEdwin = new (ELeave) CMyNotepaper;
iEdwin->SetContainerWindowL( *this );
iEdwin->ConstructL(EEikEdwinNoAutoSelection);
iEdwin->SetFocus(ETrue);
SetRect(aRect);
ActivateL();
}
CMyDownForm::~CMyDownForm()
{
delete iEdwin;
}
TKeyResponse CMyDownForm::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
return iEdwin->OfferKeyEventL(aKeyEvent, aType);
}
// ---------------------------------------------------------
// CMyDownForm::SizeChanged()
// Called by framework when the view size is changed
// ---------------------------------------------------------
//
void CMyDownForm::SizeChanged()
{
iEdwin->SetRect(Rect());
}
// ---------------------------------------------------------
// CMyDownForm::CountComponentControls() const
// ---------------------------------------------------------
//
TInt CMyDownForm::CountComponentControls() const
{
return 1; // return nbr of controls inside this container
}
// ---------------------------------------------------------
// CMyDownForm::ComponentControl(TInt aIndex) const
// ---------------------------------------------------------
//
CCoeControl* CMyDownForm::ComponentControl(TInt aIndex) const
{
switch ( aIndex )
{
case 0:
return iEdwin;
default:
return NULL;
}
}
// ---------------------------------------------------------
// CMyDownForm::Draw(const TRect& aRect) const
// ---------------------------------------------------------
//
void CMyDownForm::Draw(const TRect& /*aRect*/) const
{
}
// ---------------------------------------------------------
// CMyDownForm::HandleControlEventL(
// CCoeControl* aControl,TCoeEvent aEventType)
// ---------------------------------------------------------
//
void CMyDownForm::HandleControlEventL(
CCoeControl* aControl,TCoeEvent /*aEventType*/)
{
// TODO: Add your control event handler code here
//iFocus = aControl;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -