int CStkUIApp::OpenLastOpenedStrategy( ) { CSPStringArray & astrStrategyToOpen = AfxGetProfile().GetLastOpenedStrategy( ); CSPString strLastActive = AfxGetProfile().GetLastActiveStrategy( ); if( 0 != access(strLastActive,0) ) strLastActive.Empty(); int nCount = 0; for( int i=0; i<astrStrategyToOpen.GetSize(); i++ ) { if( 0 != access(astrStrategyToOpen.ElementAt(i),0) ) continue; if( NULL != OpenStrategyFile(astrStrategyToOpen.ElementAt(i)) ) { nCount ++; if( strLastActive.IsEmpty() ) strLastActive = astrStrategyToOpen.ElementAt(i); } } if( !strLastActive.IsEmpty() ) OpenStrategyFile(strLastActive); return nCount; }