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

📄 redcontainer.cpp

📁 一个简单的手机读写文件的例子。可以让你轻松学会在SYMBIAN中如何读写文件。
💻 CPP
字号:
#include <eiklabel.h>
#include <gulicon.h>
#include <aknutils.h>
#include <avkon.hrh>
#include <akntitle.h>
#include <eiklabel.h>
#include <Parking.mbg>
#include <Parking.rsg>

#include "ParkingAppUi.h"
#include "RedContainer.h"


CRedContainer::CRedContainer()
{
}

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

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

void CRedContainer::SizeChanged()
{
}

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

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

// ---------------------------------------------------------
// CRedContainer::Draw(const TRect& aRect) const
// handle the message when client region must be redrawn.
// ---------------------------------------------------------
//
void CRedContainer::Draw( const TRect& aRect ) const
{
	CWindowGc& gc = SystemGc();
	gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
	gc.SetBrushColor(KRgbRed);
	gc.DrawRect(Rect());
    
	TBuf<128> pathMbm;


    pathMbm.Copy(_L("z:\\system\\apps\\Parking\\Parking.mbm"));
	CParkingAppUi* pApp = (CParkingAppUi*)CEikonEnv::Static()->AppUi();
	CFbsBitmap* bitmap = new(ELeave) CFbsBitmap();
	bitmap->Load(pathMbm, EMbmParkingBb_176x144_i);
	gc.BitBlt(TPoint(0, 0), bitmap);
	delete bitmap; 


}

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

// End of File  

⌨️ 快捷键说明

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