MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / FillLookinControl

Method FillLookinControl

Editor/CustomFileDialog.cpp:927–961  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

925
926//////////////////////////////////////////////////////////////////////////
927void CCustomFileDialog::FillLookinControl()
928{
929 m_lookinCtrl.ResetContent();
930
931 int iIndex = 0;
932
933 char szCurrDir[_MAX_PATH];
934 GetCurrentDirectory( sizeof(szCurrDir),szCurrDir );
935 // Add root folder.
936 m_lookinCtrl.InsertItem( iIndex,szCurrDir,iIndex,0,0 );
937 iIndex++;
938
939 // Add current directories to lookin control.
940 CString dir = m_currentDir;
941 dir.Replace( '/','\\' );
942 while (!dir.IsEmpty())
943 {
944 int pos = dir.Find( '\\' );
945 CString subdir;
946 if (pos >= 0)
947 subdir = dir.Mid(0,pos);
948 else
949 subdir = dir;
950
951 m_lookinCtrl.InsertItem( iIndex,subdir,iIndex+1,0,0 );
952 iIndex++;
953
954 if (pos < 0)
955 break;
956 dir = dir.Mid(pos+1);
957 }
958
959 // Select last item.
960 m_lookinCtrl.SetCurSel( m_lookinCtrl.GetCount()-1 );
961}
962
963//////////////////////////////////////////////////////////////////////////
964void CCustomFileDialog::OnCbnSelendokLookin()

Callers

nothing calls this directly

Calls 8

MidMethod · 0.80
ResetContentMethod · 0.45
InsertItemMethod · 0.45
ReplaceMethod · 0.45
IsEmptyMethod · 0.45
FindMethod · 0.45
SetCurSelMethod · 0.45
GetCountMethod · 0.45

Tested by

no test coverage detected