Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.6 KiB

  1. // Copyright (C) 1997 Microsoft Corporation. All rights reserved.
  2. #if _MSC_VER > 1000
  3. #pragma once
  4. #endif
  5. #ifndef _CLISTVIEW_H_
  6. #define _CLISTVIEW_H_
  7. class CFTSListView
  8. {
  9. // methods
  10. public:
  11. CFTSListView(CExCollection* pTitleCollection, HWND m_hwndListView = NULL, bool bAdvancedSearch = FALSE);
  12. // Set the result set to use.
  13. void SetResults(int cResultCount, SEARCH_RESULT * SearchResults ) ;
  14. // Add the currently set results to the listview
  15. void AddItems();
  16. LRESULT ListViewMsg(HWND hwnd, NM_LISTVIEW* pnmhdr);
  17. void ResetQuery(void);
  18. // The following is use to set the initial size of the columns for AdvFTS mode only.
  19. void SizeColumns() ;
  20. // Internal helper functions
  21. public:
  22. // Handle TEXTCALLBACKS
  23. void OnGetDispInfo(LV_DISPINFOA* pDispInfo);
  24. void OnGetDispInfoW(LV_DISPINFOW* pDispInfo);
  25. // data members
  26. public:
  27. SEARCH_RESULT *m_pResults; // returned from Full Text Search Query.
  28. int m_cResultCount;
  29. int m_ItemNumber; // The item number of the selected item in the List View.
  30. HWND m_hwndListView; // HANDLE to the list veiw control
  31. protected:
  32. BOOL m_fInitialized;
  33. int m_cItems; // item count
  34. int m_cAllocItems; // number of items before reallocation is necessary
  35. CExCollection* m_pTitleCollection;
  36. // If true, we will use the multicolumn adv. search ui.
  37. bool m_bAdvancedSearch ;
  38. // false if we haven't done a SizeColumns.
  39. bool m_bSizeColumnsInit;
  40. // Minimum width of the location column.
  41. int m_cxLocMin ;
  42. // Minimum width of the Rank column.
  43. int m_cxRankMin ;
  44. // The default width of the control.
  45. int m_cxDefault ;
  46. };
  47. #endif // _CLISTVIEW_H_