Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 825 of file shlview.cpp.
Referenced by OnCreate(), and Refresh().
{ LPENUMIDLIST pEnumIDList; LPITEMIDLIST pidl; DWORD dwFetched; HRESULT hRes; HDPA hdpa; TRACE("%p\n", this); /* get the itemlist from the shfolder*/ hRes = pSFParent->EnumObjects(m_hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList); if (hRes != S_OK) { if (hRes == S_FALSE) return(NOERROR); return(hRes); } /* create a pointer array */ hdpa = DPA_Create(16); if (!hdpa) { return(E_OUTOFMEMORY); } /* copy the items into the array*/ while((S_OK == pEnumIDList->Next(1, &pidl, &dwFetched)) && dwFetched) { if (DPA_InsertPtr(hdpa, 0x7fff, pidl) == -1) { SHFree(pidl); } } /* sort the array */ DPA_Sort(hdpa, CompareItems, (LPARAM)pSFParent.p); /*turn the listview's redrawing off*/ SendMessageA(hWndList, WM_SETREDRAW, FALSE, 0); DPA_DestroyCallback( hdpa, fill_list, (void *)this); /*turn the listview's redrawing back on and force it to draw*/ SendMessageA(hWndList, WM_SETREDRAW, TRUE, 0); pEnumIDList->Release(); /* destroy the list*/ return S_OK; }