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.

90 lines
3.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1999
  5. //
  6. // File: tracedlg.h
  7. //
  8. // Contents: Declaration of the debug trace code
  9. //
  10. // History: 15-Jul-99 VivekJ Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #ifndef TRACEDLG_H
  14. #define TRACEDLG_H
  15. #pragma once
  16. #ifdef DBG
  17. // forward class declarations
  18. class CTraceDialog;
  19. class CTraceDialog : public CDialogImpl<CTraceDialog>
  20. {
  21. typedef CDialogImpl<CTraceDialog> BC;
  22. // Construction
  23. public:
  24. CTraceDialog() : m_dwSortData(0) {}
  25. enum { IDD = IDD_DEBUG_TRACE_DIALOG };
  26. // compare tags based on columns.
  27. static int CALLBACK CompareItems(LPARAM lp1, LPARAM lp2, LPARAM lpSortData);
  28. // Implementation
  29. protected:
  30. BEGIN_MSG_MAP(ThisClass)
  31. MESSAGE_HANDLER (WM_INITDIALOG, OnInitDialog)
  32. COMMAND_ID_HANDLER (IDOK, OnOK)
  33. COMMAND_ID_HANDLER (IDCANCEL, OnCancel)
  34. COMMAND_ID_HANDLER(IDC_TRACE_TO_COM2, OnOutputToCOM2)
  35. COMMAND_ID_HANDLER(IDC_TRACE_OUTPUTDEBUGSTRING, OnOutputDebugString)
  36. COMMAND_ID_HANDLER(IDC_TRACE_TO_FILE, OnOutputToFile)
  37. COMMAND_ID_HANDLER(IDC_TRACE_DEBUG_BREAK, OnDebugBreak)
  38. COMMAND_ID_HANDLER(IDC_TRACE_DUMP_STACK, OnDumpStack)
  39. COMMAND_ID_HANDLER(IDC_TRACE_DEFAULT, OnRestoreDefaults)
  40. COMMAND_ID_HANDLER(IDC_TRACE_SELECT_ALL, OnSelectAll)
  41. NOTIFY_HANDLER (IDC_TRACE_LIST, LVN_ITEMCHANGED, OnSelChanged)
  42. NOTIFY_HANDLER (IDC_TRACE_LIST, LVN_COLUMNCLICK, OnColumnClick)
  43. END_MSG_MAP();
  44. LRESULT OnInitDialog (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  45. LRESULT OnOK (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  46. LRESULT OnCancel (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  47. LRESULT OnOutputToCOM2 (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  48. LRESULT OnOutputDebugString (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  49. LRESULT OnOutputToFile (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  50. LRESULT OnDebugBreak (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  51. LRESULT OnDumpStack (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  52. LRESULT OnRestoreDefaults (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  53. LRESULT OnSelectAll (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  54. LRESULT OnSelChanged (int idCtrl, LPNMHDR pnmh, BOOL& bHandled );
  55. LRESULT OnColumnClick (int idCtrl, LPNMHDR pnmh, BOOL& bHandled );
  56. void RecalcCheckboxes();
  57. void DoSort();
  58. private:
  59. enum
  60. {
  61. COLUMN_CATEGORY = 0,
  62. COLUMN_NAME = 1,
  63. COLUMN_ENABLED = 2
  64. };
  65. void SetMaskFromCheckbox(UINT idControl, DWORD dwMask);
  66. WTL::CListViewCtrl m_listCtrl;
  67. WTL::CEdit m_editStackLevels;
  68. DWORD m_dwSortData;
  69. };
  70. #endif // DBG
  71. #endif // TRACEDLG_H