Ignore:
Timestamp:
Mar 27, 2000, 5:09:22 PM (25 years ago)
Author:
cbratschi
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/shlview.cpp

    r3243 r3250  
    1 /* $Id: shlview.cpp,v 1.9 2000-03-26 16:34:54 cbratschi Exp $ */
     1/* $Id: shlview.cpp,v 1.10 2000-03-27 15:09:22 cbratschi Exp $ */
    22/*
    33 * ShellView
     
    1717 * buily according to the columns shown.
    1818 *
    19  * FIXME: Load/Save the view state from/into the stream provied by
     19 * FIXME: Load/Save the view state from/into the stream provided by
    2020 * the ShellBrowser
    2121 *
     
    496496   LPITEMIDLIST   pidl;
    497497   DWORD    dwFetched;
    498    UINT     i;
     498   UINT     i,iPos;
    499499   LVITEMA  lvItem;
    500500   HRESULT  hRes;
     
    502502
    503503//CB: really slow, even without debug information
    504    //DecreaseLogCount();
    505504   TRACE("%p\n",This);
    506505
     
    517516   }
    518517
    519 //CB: ILClone calls
    520518   /* create a pointer array */
    521    hdpa = pDPA_Create(64);
     519   hdpa = pDPA_Create(1024);
    522520   if (!hdpa)
    523521   {
     
    526524
    527525   /* copy the items into the array*/
    528    while((S_OK == IEnumIDList_Next(pEnumIDList,1, &pidl, &dwFetched)) && dwFetched)
     526   while((S_OK == IEnumIDList_Next(pEnumIDList,1,(LPITEMIDLIST*)&pidl,&dwFetched)) && dwFetched)
    529527   {
    530528     if (pDPA_InsertPtr(hdpa, 0x7fff, pidl) == -1)
     
    534532   }
    535533
    536 //CB: only Get* calls
    537534   /*sort the array*/
    538535   pDPA_Sort(hdpa, (PFNDPACOMPARE)ShellView_CompareItems, (LPARAM)This->pSFParent);
     
    545542   lvItem.pszText = LPSTR_TEXTCALLBACKA;                  /*get text on a callback basis*/
    546543   lvItem.iImage = I_IMAGECALLBACK;                       /*get the image on a callback basis*/
     544   iPos = ListView_GetItemCount(This->hWndList);
    547545
    548546   for (i = 0; i < DPA_GetPtrCount(hdpa); ++i)   /* DPA_GetPtrCount is a macro*/
     
    552550     if (IncludeObject(This, pidl) == S_OK) /* in a commdlg This works as a filemask*/
    553551     {
    554        lvItem.iItem = i;                                      /*add the item to the end of the list*/
     552       lvItem.iItem = iPos;                                      /*add the item to the end of the list*/
    555553       lvItem.lParam = (LPARAM)pidl;                         /*set the item's data*/
    556554       ListView_InsertItemA(This->hWndList, &lvItem);
     555       iPos++;
    557556     }
    558557     else
     
    565564   IEnumIDList_Release(pEnumIDList); /* destroy the list*/
    566565   pDPA_Destroy(hdpa);
    567    //IncreaseLogCount();
    568566
    569567   return S_OK;
Note: See TracChangeset for help on using the changeset viewer.