Leaked source code of windows server 2003
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.

183 lines
5.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: T R A C E U I . H
  7. //
  8. // Contents: Tracing Property sheet UI
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 31 Aug 1998
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include <atlbase.h>
  17. extern CComModule _Module;
  18. #include <atlcom.h>
  19. #ifdef SubclassWindow
  20. #undef SubclassWindow
  21. #endif
  22. #include <atlwin.h>
  23. #include "ncatl.h"
  24. #include "ncatlps.h"
  25. #include "resource.h"
  26. #include <nctraceui.h>
  27. //---[ Classes and structs ]--------------------------------------------------
  28. #if 0
  29. struct ADVANCED_ITEM_DATA
  30. {
  31. PWSTR szwName;
  32. INetCfgComponent * pncc;
  33. };
  34. #endif
  35. //
  36. // CTraceUIDlg
  37. //
  38. class CTraceUIDlg :
  39. public CDialogImpl<CTraceUIDlg>
  40. {
  41. BEGIN_MSG_MAP(CTraceUIDlg)
  42. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  43. END_MSG_MAP()
  44. // enum { IDD = IDD_LAN_CONNECT};
  45. CTraceUIDlg() {};
  46. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam,
  47. LPARAM lParam, BOOL& bHandled);
  48. };
  49. //
  50. // Trace UI TraceTag Page
  51. //
  52. class CTraceTagPage: public CPropSheetPage
  53. {
  54. public:
  55. BEGIN_MSG_MAP(CTraceTagPage)
  56. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  57. MESSAGE_HANDLER(WM_SETCURSOR, OnSetCursor)
  58. MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
  59. MESSAGE_HANDLER(WM_HELP, OnHelp)
  60. NOTIFY_CODE_HANDLER(PSN_QUERYCANCEL, OnCancel)
  61. NOTIFY_CODE_HANDLER(PSN_APPLY, OnApply)
  62. // Listview handlers
  63. NOTIFY_CODE_HANDLER(NM_CLICK, OnClick)
  64. NOTIFY_CODE_HANDLER(NM_DBLCLK, OnDbClick)
  65. NOTIFY_CODE_HANDLER(LVN_KEYDOWN, OnKeyDown)
  66. NOTIFY_CODE_HANDLER(LVN_ITEMCHANGED, OnItemChanged)
  67. NOTIFY_CODE_HANDLER(LVN_DELETEITEM, OnDeleteItem)
  68. END_MSG_MAP()
  69. enum {IDD = IDD_TRACETAGS};
  70. CTraceTagPage();
  71. ~CTraceTagPage();
  72. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam,
  73. LPARAM lParam, BOOL& bHandled);
  74. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  75. LRESULT OnDestroy(UINT uMsg, WPARAM wParam,
  76. LPARAM lParam, BOOL& bHandled);
  77. LRESULT OnSetCursor(UINT uMsg, WPARAM wParam,
  78. LPARAM lParam, BOOL& bHandled);
  79. LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  80. LRESULT OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  81. BOOL& bHandled);
  82. LRESULT OnProperties(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  83. BOOL& bHandled);
  84. LRESULT OnApply(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  85. LRESULT OnCancel(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  86. LRESULT OnDeleteItem(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  87. // listview handlers
  88. LRESULT OnClick(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  89. LRESULT OnDbClick(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  90. LRESULT OnKeyDown(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  91. LRESULT OnItemChanged(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  92. private:
  93. HIMAGELIST m_hil;
  94. HWND m_hwndLV;
  95. BOOL m_fLocked;
  96. HIMAGELIST m_hilCheckIcons;
  97. HCURSOR m_hPrevCurs;
  98. };
  99. //
  100. // Trace UI TraceTag Page
  101. //
  102. class CDbgFlagPage: public CPropSheetPage
  103. {
  104. public:
  105. BEGIN_MSG_MAP(CDbgFlagPage)
  106. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  107. MESSAGE_HANDLER(WM_SETCURSOR, OnSetCursor)
  108. MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
  109. MESSAGE_HANDLER(WM_HELP, OnHelp)
  110. NOTIFY_CODE_HANDLER(PSN_QUERYCANCEL, OnCancel)
  111. NOTIFY_CODE_HANDLER(PSN_APPLY, OnApply)
  112. // Listview handlers
  113. NOTIFY_CODE_HANDLER(NM_CLICK, OnClick)
  114. NOTIFY_CODE_HANDLER(NM_DBLCLK, OnDbClick)
  115. NOTIFY_CODE_HANDLER(LVN_KEYDOWN, OnKeyDown)
  116. NOTIFY_CODE_HANDLER(LVN_ITEMCHANGED, OnItemChanged)
  117. NOTIFY_CODE_HANDLER(LVN_DELETEITEM, OnDeleteItem)
  118. END_MSG_MAP()
  119. enum {IDD = IDD_TRACETAGS};
  120. CDbgFlagPage();
  121. ~CDbgFlagPage();
  122. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam,
  123. LPARAM lParam, BOOL& bHandled);
  124. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  125. LRESULT OnDestroy(UINT uMsg, WPARAM wParam,
  126. LPARAM lParam, BOOL& bHandled);
  127. LRESULT OnSetCursor(UINT uMsg, WPARAM wParam,
  128. LPARAM lParam, BOOL& bHandled);
  129. LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  130. LRESULT OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  131. BOOL& bHandled);
  132. LRESULT OnProperties(WORD wNotifyCode, WORD wID, HWND hWndCtl,
  133. BOOL& bHandled);
  134. LRESULT OnApply(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  135. LRESULT OnCancel(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  136. LRESULT OnDeleteItem(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  137. // listview handlers
  138. LRESULT OnClick(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  139. LRESULT OnDbClick(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  140. LRESULT OnKeyDown(int idCtrl, LPNMHDR pnmh, BOOL& fHandled);
  141. LRESULT OnItemChanged(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  142. private:
  143. HIMAGELIST m_hil;
  144. HWND m_hwndLV;
  145. BOOL m_fLocked;
  146. HIMAGELIST m_hilCheckIcons;
  147. HCURSOR m_hPrevCurs;
  148. };
  149. //
  150. // Global functions
  151. //
  152. VOID OnTraceHelpGeneric(HWND hwnd, LPARAM lParam);
  153. HRESULT HrInitTraceListView(HWND hwndList, HIMAGELIST *philStateIcons);
  154. VOID UninitTraceListView(HWND hwndList);