/////////////////////////////////////////////////////////////////////
| 925 | |
| 926 | ////////////////////////////////////////////////////////////////////////// |
| 927 | void 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 | ////////////////////////////////////////////////////////////////////////// |
| 964 | void CCustomFileDialog::OnCbnSelendokLookin() |
nothing calls this directly
no test coverage detected