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

📄 yellowcontainer.cpp

📁 自己做的一个练习的小例子
💻 CPP
字号:

#include <gulicon.h>
#include <aknutils.h>    // definition of AKN_LAF_COLOR()
#include <avkon.hrh>
#include <akntitle.h>
#include <aknnotewrappers.h>

#include "YellowContainer.h"


//////////////////////////////////////////////////////////////////////////
CYellowContainer::CYellowContainer()
{
}

// EPOC default constructor can leave.
void CYellowContainer::ConstructL(const TRect& aRect)
{
    CreateWindowL();
    SetRect( aRect );
    ActivateL();
}

// destructor
CYellowContainer::~CYellowContainer()
{
}

void CYellowContainer::SizeChanged()
{
}

// ---------------------------------------------------------
// CYellowContainer::CountComponentControls() const
// return the number of controls
// ---------------------------------------------------------
//
TInt CYellowContainer::CountComponentControls() const
{
	// return number of controls inside this container
	return 0; 
}

// ---------------------------------------------------------
// CYellowContainer::ComponentControl(TInt aIndex) const
// return the pointer to specified control.
// ---------------------------------------------------------
//
CCoeControl* CYellowContainer::ComponentControl( TInt /*aIndex*/ ) const
{
	return NULL;
}

// ---------------------------------------------------------
// CYellowContainer::Draw(const TRect& aRect) const
// handle the message when client region must be Yellowrawn.
// ---------------------------------------------------------
//
void CYellowContainer::Draw( const TRect& /*aRect*/ ) const
{
	CWindowGc& gc = SystemGc();
	gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
	gc.SetBrushColor(KRgbYellow);
	gc.DrawRect(Rect());
}

// ---------------------------------------------------------
// CAknExGridContainer::OfferKeyEventL(
//           const TKeyEvent& aKeyEvent, TEventCode aType )
// Handles the key events.
// ---------------------------------------------------------
//
TKeyResponse CYellowContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType )
{
	return EKeyWasConsumed;
}



⌨️ 快捷键说明

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