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.

135 lines
2.8 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1998.
  5. //
  6. // File: LookInDlg.hxx
  7. //
  8. // Contents: Definition of class to display a dialog representing the
  9. // scope hierarchy contained in an instance of the
  10. // CScopeManager class.
  11. //
  12. // Classes: CLookInDlg
  13. //
  14. // History: 01-31-2000 davidmun Created
  15. //
  16. //---------------------------------------------------------------------------
  17. #ifndef __LOOK_IN_DLG_HXX_
  18. #define __LOOK_IN_DLG_HXX_
  19. //+--------------------------------------------------------------------------
  20. //
  21. // Class: CLookInDlg
  22. //
  23. // Purpose: Drive the dialog which allows the user to pick where to
  24. // query for objects.
  25. //
  26. // History: 06-22-2000 DavidMun Created
  27. //
  28. //---------------------------------------------------------------------------
  29. class CLookInDlg: public CDlg
  30. {
  31. public:
  32. CLookInDlg(
  33. const CObjectPicker &rop):
  34. m_rop(rop),
  35. m_hImageList(NULL),
  36. m_htiStartingScope(NULL),
  37. m_cxMin(0),
  38. m_cyMin(0),
  39. m_cxSeparation(0),
  40. m_cySeparation(0),
  41. m_cxFrameLast(0),
  42. m_cyFrameLast(0)
  43. {
  44. TRACE_CONSTRUCTOR(CLookInDlg);
  45. }
  46. ~CLookInDlg()
  47. {
  48. TRACE_DESTRUCTOR(CLookInDlg);
  49. if (m_hImageList)
  50. {
  51. ImageList_Destroy(m_hImageList);
  52. m_hImageList = NULL;
  53. }
  54. m_htiStartingScope = NULL;
  55. }
  56. void
  57. DoModal(
  58. HWND hwndParent,
  59. CScope *pCurScope) const;
  60. CScope *
  61. GetSelectedScope() const
  62. {
  63. return m_rpSelectedScope.get();
  64. }
  65. protected:
  66. virtual HRESULT
  67. _OnInit(
  68. BOOL *pfSetFocus);
  69. virtual BOOL
  70. _OnCommand(
  71. WPARAM wParam,
  72. LPARAM lParam);
  73. virtual BOOL
  74. _OnNotify(
  75. WPARAM wParam,
  76. LPARAM lParam);
  77. virtual void
  78. _OnHelp(
  79. UINT message,
  80. WPARAM wParam,
  81. LPARAM lParam);
  82. virtual void
  83. _OnSysColorChange();
  84. void
  85. _AddScopes(
  86. HTREEITEM hRoot,
  87. vector<RpScope>::const_iterator itBegin,
  88. vector<RpScope>::const_iterator itEnd);
  89. virtual BOOL
  90. _OnSize(
  91. WPARAM wParam,
  92. LPARAM lParam);
  93. virtual BOOL
  94. _OnMinMaxInfo(
  95. LPMINMAXINFO lpmmi);
  96. private:
  97. const CObjectPicker &m_rop;
  98. HIMAGELIST m_hImageList;
  99. HTREEITEM m_htiStartingScope;
  100. mutable RpScope m_rpSelectedScope;
  101. //
  102. // These are used for resizing
  103. //
  104. LONG m_cxMin;
  105. LONG m_cyMin;
  106. LONG m_cxSeparation;
  107. LONG m_cySeparation;
  108. LONG m_cxFrameLast;
  109. LONG m_cyFrameLast;
  110. };
  111. #endif // __LOOK_IN_DLG_HXX_