void CCustomWrapAppControl::HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType)
	{
	if (aEventType==EEventRequestFocus)
		{
		iFocusControl=aControl;
		iFocusControl->SetFocus(ETrue,EDrawNow);
		}
	} 
/**
  Handles destruction of any control. It is called by framework if any control is destroyed.\n
  Accesses the component controls to make sure the components are not removed from
  CCoeControlArray before notifying the observer.\n
*/
void CTestMCoeFocusObserver::HandleDestructionOfFocusedItem()
	{
	TInt cnt = iCtlContainer.CountComponentControls();
	while(cnt--)
		{
		CCoeControl* child = iCtlContainer.ComponentControl(cnt);
		child->SetFocus(ETrue); // use control to make sure its not deleted
		}
	}
void CCustomWrapAppControl::ConstructL()
	{
	CreateWindowL();
    Window().SetShadowDisabled(ETrue);
	CreateEdwinL();
	iStandardCustomWrap = iEdwin->TextLayout()->CustomWrap();
	iFocusControl=iEdwin;
	SetExtentToWholeScreen();
	ActivateL();
	iFocusControl->SetFocus(ETrue);
	}
void CNewDestDialog::RemoveInputFocus()
{
   CCoeControl* control = ControlOrNull( EWayFinderCtrlNewDestCityEdwin );
   if( control ) {
      control->SetFocus( EFalse );
   }
   control = ControlOrNull( EWayFinderCtrlNewDestHouseNumEdwin);
   if( control ) {
      control->SetFocus( EFalse );
   }
   control = ControlOrNull( EWayFinderCtrlNewDestStringEdwin );
   if( control ) {
      control->SetFocus( EFalse );
   }
   control = ControlOrNull( EWayFinderCtrlNewDestCountryEdwin );
   if( control ) {
      control->SetFocus( EFalse );
   }
   iHasFocus = EFalse;
}