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.

130 lines
3.7 KiB

  1. /*****************************************************************************
  2. *
  3. * Perfmon.h - This is the main include file. It contains all major data
  4. * structures and general defines.
  5. *
  6. * Microsoft Confidential
  7. * Copyright (c) 1992-1993 Microsoft Corporation
  8. *
  9. * Author: Mike Moskowicz
  10. *
  11. * [1-May-1992]
  12. *
  13. ****************************************************************************/
  14. #include <nt.h>
  15. #include <ntrtl.h>
  16. #include <nturtl.h>
  17. #include <limits.h>
  18. #include <windows.h>
  19. #include <commdlg.h>
  20. #include <shellapi.h>
  21. #include <stdlib.h>
  22. #include <string.h>
  23. #include <winperf.h>
  24. #include "perfmrc.h"
  25. #include "strids.h"
  26. #include "menuids.h"
  27. #include "dlgids.h"
  28. #include "sizes.h"
  29. #include "typedefs.h"
  30. #include "winhelpr.h"
  31. // VOID ErrorExit(LPTSTR pszError,HWND hwnd) ;
  32. // extern VOID ErrorExit(LPTSTR,HWND);
  33. extern VOID LoadLineGraphSettings(PGRAPHSTRUCT);
  34. extern VOID LoadRefreshSettings(PGRAPHSTRUCT);
  35. extern VOID SetGraphTimer(PGRAPHSTRUCT lgraph) ;
  36. extern BOOL QueryTitleEntry(HKEY,DWORD,DWORD,DWORD,LPTSTR);
  37. extern VOID ResetGraphTimer(PGRAPHSTRUCT lgraph);
  38. //==========================================================================//
  39. // Constants //
  40. //==========================================================================//
  41. #define VERSION_NUMBER 1
  42. #define SAVED_LOG 4
  43. #define SAVED_ALERT 2
  44. #define SAVED_GRAPH 1
  45. #define SAVED_WORKSPACE (SAVED_GRAPH | SAVED_ALERT | SAVED_LOG)
  46. #define FNAMLEN 128
  47. #define szScalesFontFace TEXT("Helv")
  48. #define iScalesFontHeight 8
  49. #define szScalesPrinterFontFace TEXT("Helvetica")
  50. #define iScalesPrinterFontHeight 12
  51. #define iTitlePrinterFontHeight 18
  52. #define crLightGray RGB (0xC0, 0xC0, 0xC0)
  53. #define crDarkGray RGB (0x40, 0x40, 0x40)
  54. #define crGray RGB (0x80, 0x80, 0x80)
  55. #define crRed RGB (0xFF, 0x00, 0x00)
  56. #define crGreen RGB (0x00, 0xFF, 0x00)
  57. #define crBlue RGB (0x00, 0x00, 0xFF)
  58. #define crBlack RGB (0x00, 0x00, 0x00)
  59. #define crWhite RGB (0xFF, 0xFF, 0xFF)
  60. #define LogTimerID 100
  61. #define AlertTimerID 200
  62. #define ChartTimerID 300
  63. #define ReportTimerID 400
  64. #define ChartTool IDM_VIEWCHART
  65. #define AlertTool IDM_VIEWALERT
  66. #define LogTool IDM_VIEWLOG
  67. #define ReportTool IDM_VIEWREPORT
  68. #define AddTool IDM_TOOLBARADD
  69. #define EditTool IDM_TOOLBARMODIFY
  70. #define DeleteTool IDM_TOOLBARDELETE
  71. #define RefreshTool IDM_TOOLBARREFRESH
  72. #define BookmarkTool IDM_OPTIONSBOOKMARK
  73. #define OptionsTool IDM_TOOLBAROPTIONS
  74. #define szComputerPrefix TEXT("\\\\") // two backslashes
  75. #define WIDESTYLES FALSE // Don't allow wide styled lines
  76. //==========================================================================//
  77. // Global Data //
  78. //==========================================================================//
  79. #include "globals.h"
  80. //==========================================================================//
  81. // Exported Functions //
  82. //==========================================================================//
  83. LRESULT
  84. APIENTRY
  85. MainWndProc (
  86. HWND hwnd,
  87. UINT message,
  88. WPARAM wParam,
  89. LPARAM lParam
  90. ) ;
  91. void SizePerfmonComponents (void) ;
  92. #ifdef UNICODE
  93. #define TSPRINTF swprintf
  94. #else
  95. #define TSPRINTF sprintf
  96. #endif