?? bluecontainer.cpp
字號:
#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 "BlueContainer.h"
CBlueContainer::CBlueContainer()
{
}
// EPOC default constructor can leave.
void CBlueContainer::ConstructL(const TRect& aRect)
{
CreateWindowL();
SetRect( aRect );
ActivateL();
}
// destructor
CBlueContainer::~CBlueContainer()
{
}
void CBlueContainer::SizeChanged()
{
}
// ---------------------------------------------------------
// CBlueContainer::CountComponentControls() const
// return the number of controls
// ---------------------------------------------------------
//
TInt CBlueContainer::CountComponentControls() const
{
// return number of controls inside this container
return 0;
}
// ---------------------------------------------------------
// CBlueContainer::ComponentControl(TInt aIndex) const
// return the pointer to specified control.
// ---------------------------------------------------------
//
CCoeControl* CBlueContainer::ComponentControl( TInt /*aIndex*/ ) const
{
return NULL;
}
// ---------------------------------------------------------
// CBlueContainer::Draw(const TRect& aRect) const
// handle the message when client region must be redrawn.
// ---------------------------------------------------------
//
void CBlueContainer::Draw( const TRect& /*aRect*/ ) const
{
CWindowGc& gc = SystemGc();
gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
gc.SetBrushColor(KRgbBlue);
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, EMbmParkingJinsha_176x144_i);
gc.BitBlt(TPoint(0, 0), bitmap);
delete bitmap;
// gc.DrawRect(TRect(TPoint(10, 10), TSize(20, 20)));
}
// ---------------------------------------------------------
// CAknExGridContainer::OfferKeyEventL(
// const TKeyEvent& aKeyEvent, TEventCode aType )
// Handles the key events.
// ---------------------------------------------------------
//
TKeyResponse CBlueContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType )
{
return EKeyWasNotConsumed;
}
// End of File
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -