Changeset 165

Show
Ignore:
Timestamp:
05/11/10 18:09:34 (4 months ago)
Author:
bbrinkmann
Message:

multi file select bug?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • public/trunk/pmfb/utilities/PMFB File Converter/win/main/PMFB File ConverterDlg.cpp

    r150 r165  
    166166 
    167167        if (!m_bExplorer)  // only supported for Explorer Dialog 
    168                 return FALSE;   
    169          
     168                return FALSE; 
     169 
    170170        CWnd* pWnd = GetParent()->GetDlgItem(lst2); 
    171171        if (pWnd == NULL) 
     
    179179                return FALSE; 
    180180 
    181         mInitialDir = GetFolderPath(); 
    182                                                         // /\ 4.2: undocumented, but non-implementation 
    183         CString strItemText; 
    184         // Could this iteration code be cleaner? 
    185         for (int nItem = wndLst1->GetNextItem(-1,LVNI_SELECTED);  
    186                         nSelected-- > 0; nItem = wndLst1->GetNextItem(nItem, LVNI_SELECTED)) 
    187         { 
    188                 strItemText = wndLst1->GetItemText(nItem,0); 
    189                 if (mInitialDir.Right(1) == _T("\\")) 
    190                         strItemText = mInitialDir + strItemText; 
    191                 else 
    192                         strItemText = mInitialDir + _T("\\") + strItemText; 
    193  
     181        POSITION pos = GetStartPosition(); 
     182        while( pos ) 
     183        { 
     184                CString strItemText(GetNextPathName(pos)); 
     185                //implement ur fn to open the file accordingly 
    194186                if (!m_listDisplayNames.Find(strItemText)) 
    195187                { 
     
    201193                        m_wndSelectionsList.AddString(strItemText); 
    202194                } 
    203         }       
    204          
     195        } 
     196 
    205197        return TRUE; 
    206198}