Hi, I am trying to create a custom control (COnTopText) which stays always on top of the screen and carries some text in it.
I am trying to draw the text using CWindowGc:
rawText(), but for some reason I am not able to get it work.

Here is my code:
Code:
void COnTopText::ConstructL()
{
iMyWinowGroup = RWindowGroup( iCoeEnv->WsSession());
User::LeaveIfError( iMyWinowGroup.Construct( (TUint32) &iMyWinowGroup) );
iMyWinowGroup.SetOrdinalPosition( 0, ECoeWinPriorityAlwaysAtFront );
iMyWinowGroup.EnableReceiptOfFocus( EFalse );
CreateWindowL( &iMyWinowGroup );
SetRect(TRect(5,250,235,279));
ActivateL();
DrawNow();
}
void COnTopText::Draw( TRect &aRect ) const
{
CWindowGc &gc = SystemGc();
gc.Clear();
gc.UseFont( iCoeEnv->NormalFont());
gc.SetPenColor( TRgb( 0, 0, 0xFF ));
gc.DrawText( KMyText, TPoint( 7, 252 ) );
}
Please help...