Changeset 3217 for trunk/src/shell32/shlview.cpp
- Timestamp:
- Mar 24, 2000, 6:17:30 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/shlview.cpp
r3193 r3217 1 /* $Id: shlview.cpp,v 1. 7 2000-03-22 16:55:52cbratschi Exp $ */1 /* $Id: shlview.cpp,v 1.8 2000-03-24 17:17:28 cbratschi Exp $ */ 2 2 /* 3 3 * ShellView … … 14 14 * appearing in the view. To fix this it should use the IShellFolder2 15 15 * interface when possible to get the informations dynamically 16 * this will take a lot of work to impleme t and wont likely not16 * this will take a lot of work to implement and wont likely not 17 17 * be done in near future 18 18 * Please considder this when code new features. Mail me if you … … 105 105 #define LISTVIEW_COLUMN_TIME 3 106 106 #define LISTVIEW_COLUMN_ATTRIB 4 107 //CB: todo: drive view! 107 108 108 109 /*menu items */ … … 328 329 lvColumn.fmt = sd.fmt; 329 330 lvColumn.cx = sd.cxChar*8; /* chars->pixel */ 330 331 StrRetToStrNA( szTemp, 50, &sd.str, NULL); 331 332 ListView_InsertColumnA(This->hWndList, i, &lvColumn); 332 333 } … … 475 476 UINT i; 476 477 LVITEMA lvItem; 477 HRESULT 478 HRESULT hRes; 478 479 HDPA hdpa; 479 480 481 //CB: really slow, even without debug information 482 //DecreaseLogCount(); 480 483 TRACE("%p\n",This); 481 484 485 //CB: FindFirstFileA, many calls to FindNextFileA in this block 486 // OS/2's APIs can read more than one file per call -> much faster 487 // -> add a new API for faster handling 482 488 /* get the itemlist from the shfolder*/ 483 489 hRes = IShellFolder_EnumObjects(This->pSFParent,This->hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList); … … 489 495 } 490 496 497 //CB: ILClone calls 491 498 /* create a pointer array */ 492 hdpa = pDPA_Create( 16);499 hdpa = pDPA_Create(64); 493 500 if (!hdpa) 494 501 { … … 505 512 } 506 513 514 //CB: only Get* calls 507 515 /*sort the array*/ 508 516 pDPA_Sort(hdpa, (PFNDPACOMPARE)ShellView_CompareItems, (LPARAM)This->pSFParent); … … 511 519 SendMessageA(This->hWndList, WM_SETREDRAW, FALSE, 0); 512 520 513 for (i=0; i < DPA_GetPtrCount(hdpa); ++i) /* DPA_GetPtrCount is a macro*/ 521 ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listviewitem*/ 522 lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/ 523 lvItem.pszText = LPSTR_TEXTCALLBACKA; /*get text on a callback basis*/ 524 lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ 525 526 for (i = 0; i < DPA_GetPtrCount(hdpa); ++i) /* DPA_GetPtrCount is a macro*/ 514 527 { 515 528 pidl = (LPITEMIDLIST)DPA_GetPtr(hdpa, i); 529 516 530 if (IncludeObject(This, pidl) == S_OK) /* in a commdlg This works as a filemask*/ 517 531 { 518 ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listviewitem*/ 519 lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/ 520 lvItem.iItem = i; /*add the item to the end of the list*/ 521 lvItem.lParam = (LPARAM) pidl; /*set the item's data*/ 522 lvItem.pszText = LPSTR_TEXTCALLBACKA; /*get text on a callback basis*/ 523 lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ 532 lvItem.iItem = i; /*add the item to the end of the list*/ 533 lvItem.lParam = (LPARAM)pidl; /*set the item's data*/ 524 534 ListView_InsertItemA(This->hWndList, &lvItem); 525 535 } … … 535 545 IEnumIDList_Release(pEnumIDList); /* destroy the list*/ 536 546 pDPA_Destroy(hdpa); 547 //IncreaseLogCount(); 537 548 538 549 return S_OK; … … 1078 1089 { 1079 1090 SHELLDETAILS sd; 1091 1080 1092 IShellFolder2_GetDetailsOf(This->pSF2Parent, pidl, lpdi->item.iSubItem, &sd); 1081 1093 StrRetToStrNA( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.