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.

102 lines
2.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999.
  5. //
  6. // File: view.hxx
  7. //
  8. // Contents:
  9. //
  10. // History: 15 Aug 1996 DLee Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #pragma once
  14. class CSearchQuery;
  15. class CSearchControl;
  16. class CSearchView
  17. {
  18. public:
  19. CSearchView( HWND hwndSearch, CSearchControl & control, CColumnList & columns );
  20. ~CSearchView();
  21. void InitPanes ( HWND hwndQueryTitle,
  22. HWND hwndQuery,
  23. HWND hwdList,
  24. HWND hwndHeader );
  25. void SysColorChange();
  26. void Size ( int cx, int cy);
  27. int Lines () { return _cLines; }
  28. int GetLineHeight () { return _iLineHeightList; }
  29. void PrimeItem (LPDRAWITEMSTRUCT& lpdis, RECT& rc);
  30. void PaintItem ( CSearchQuery* pSearch,
  31. HDC hdc,
  32. RECT &rc,
  33. DWORD iRow);
  34. void FontChanged(HFONT hfontNew);
  35. void ColumnsChanged();
  36. unsigned ColumnWidth( unsigned x );
  37. void SetColumnWidth( unsigned x, unsigned cpWidth );
  38. unsigned SetDefColumnWidth( unsigned iCol );
  39. void ResizeQueryCB();
  40. private:
  41. void MakeFont();
  42. int _MeasureString(HDC hdc,WCHAR *pwc,RECT &rc,int cwc=-1);
  43. void _ComputeFieldWidths();
  44. int _cLines;
  45. int _iLineHeightList;
  46. HWND _hwndSearch;
  47. HWND _hwndQuery;
  48. HWND _hwndList;
  49. HWND _hwndQueryTitle;
  50. HWND _hwndHeader;
  51. BOOL _fHavePlacedTitles;
  52. HFONT _hfontShell;
  53. int _cpFontHeight;
  54. int _cpDateWidth;
  55. int _cpTimeWidth;
  56. int _cpGuidWidth;
  57. int _cpAvgWidth;
  58. int _cpBoolWidth;
  59. int _cpAttribWidth;
  60. int _cpFileIndexWidth;
  61. HBRUSH _hbrushWindow;
  62. HBRUSH _hbrushHighlight;
  63. unsigned _iColAttrib;
  64. unsigned _iColFileIndex;
  65. DWORD _colorHighlight;
  66. DWORD _colorHighlightText;
  67. DWORD _colorWindow;
  68. DWORD _colorWindowText;
  69. unsigned _aWidths[maxBoundCols];
  70. DBTYPE _aPropTypes[maxBoundCols];
  71. CColumnList & _columns;
  72. CSearchControl & _control;
  73. BOOL _fMucked;
  74. };