in AppView
#include <coemain.h>
#include <eikenv.h>
#include "demo2.mbg"
#include <fbs.h>
#include "Demo2AppView.h"
_LIT( KFullBitName, "\\resource\\apps\\Demo2.mbm" );
void CDemo2AppView::ConstructL(const TRect& aRect)
{
// Create a window for this application view
CreateWindowL();
TFileName filePath( KFullBitName );
User::LeaveIfError( 0 );
iBitmap = new (ELeave) CFbsBitmap();
User::LeaveIfError ( iBitmap->Load( filePath, EMbmDemo2Bricks ));
// Set the windows size
SetRect(aRect);
// Activate the window, which makes it ready to be drawn
ActivateL();
}
void CDemo2AppView:

raw(const TRect& /*aRect*/) const
{
// Get the standard graphics context
CWindowGc& gc = SystemGc();
// Gets the control's extent
TRect drawRect(Rect());
TRect aRect;
// Clears the screen
gc.Clear(drawRect);
gc.BitBlt(aRect.iTl, iBitmap);
}