void CTcSettingsDialog::PreLayoutDynInitL() { CEikChoiceList* iapList = reinterpret_cast< CEikChoiceList* >( Control( ECtrlIAPName ) ); CDesCArray* names = iapList->DesCArray(); names->Delete( 0 ); // delete dummy item from array TInt count = iIAPManager->MdcaCount(); for( TInt i = 0; i < count; i++ ) { TBuf< KCommsDbSvrMaxFieldLength > name16; name16.Copy( iIAPManager->MdcaPoint( i ) ); names->AppendL( name16 ); if( (TInt)iIAPManager->Id( i ) == iSettings.iIAPId ) { iapList->SetCurrentItem( i ); } } SetChoiceListCurrentItem( ECtrlConnection, iSettings.iBearerType ); TBuf<40> remoteAddrText; iSettings.iTCPRemoteAddr.Output( remoteAddrText ); SetEdwinTextL(ECtrlRemoteAddr, &remoteAddrText); SetNumberEditorValue( ECtrlTcpPort, iSettings.iTCPPort ); SetChoiceListCurrentItem( ECtrlCSYName, iSettings.iCSYName ); SetChoiceListCurrentItem( ECtrlCommPort, iSettings.iCommPort ); SetNumberEditorValue( ECtrlBaudrate, iSettings.iBaudrate ); TInt autoconnect( 1 ); if( !iSettings.iAutoConnect ) { autoconnect = 0; // no autoconnect } SetChoiceListCurrentItem( ECtrlAutoConnect, autoconnect ); }