View a printable version of the current page.
  Wiki > Symbian Developer Network Public Wiki > ... > SDN Wiki Competition 2007 entries > Override calling window
  Override calling window
Added by eswar_illuri, last edited by Rodney De Gale on Feb 15, 2008  (view change)
Labels: 
(None)

To override the existing calling window from our application, we have to use the following code,

void DisplayCallingWindow()
{
                                          iWindow.SetExtent(TPoint(32, 134), TSize(134, 46));
		
		iGroup.SetOrdinalPosition(0, 500);
		iGroup.EnableReceiptOfFocus(EFalse);
		iWindow.SetOrdinalPosition(0, 500);
		
		// Drawing with gc and window
		iGc->Activate(iWindow);

		TRect rect = TRect(iWindow.Size());
		iWindow.Invalidate(rect);
		iWindow.BeginRedraw(rect);
		iGc->SetBrushColor(KRgbWhite);
		iGc->SetBrushStyle(CGraphicsContext::ESolidBrush);
		iGc->Clear();

		// draw here
		CFont *font;
		TFontSpec fontSpec(_L("LatinBold13"), 13*13);
		User::LeaveIfError(iScreen->GetNearestFontInTwips(font, fontSpec));
		iGc->UseFont(font);


		iGc->DrawText(_L("<Display Name Here>"), TPoint(14,22));
		iGc->DrawText(_L("Calling"), TPoint(14,37));
		}
}

In header file we need to declare the variables iWindow,iGroup,iGc

RWindow iWindow;
CWindowGc iGc;
RWindowGroup iGroup;

Call the above function when we handle the calls from our application.

[live-web] Interactive Services Terms & Conditions of use | Terms of use | Privacy policy | Media Center | Contact us | © 2008 Symbian