home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sdktools / winnt / perfmon / perfmon.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-05  |  4.2 KB  |  139 lines

  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-1997 Microsoft Corporation
  8.  *
  9.  *  Author: Mike Moskowicz
  10.  *
  11.  *          [1-May-1992]
  12.  *
  13.  ****************************************************************************/
  14.  
  15.  
  16. #include <limits.h>
  17. #include <windows.h>
  18. #include <commdlg.h>
  19. #include <shellapi.h>
  20. #include <stdlib.h>
  21. #include <string.h>
  22. #include <winperf.h>
  23. #include <tchar.h>
  24.  
  25. #include "perfmrc.h"
  26. #include "strids.h"
  27. #include "menuids.h"
  28. #include "dlgids.h"
  29.  
  30. #include "sizes.h"
  31. #include "typedefs.h"
  32. #include "winhelpr.h"
  33.  
  34.  
  35. extern VOID LoadLineGraphSettings(PGRAPHSTRUCT);
  36. extern VOID LoadRefreshSettings(PGRAPHSTRUCT);
  37. extern VOID SetGraphTimer(PGRAPHSTRUCT lgraph) ;
  38. extern BOOL QueryTitleEntry(HKEY,DWORD,DWORD,DWORD,LPTSTR);
  39. extern VOID ResetGraphTimer(PGRAPHSTRUCT lgraph);
  40.  
  41.  
  42. //==========================================================================//
  43. //                                  Constants                               //
  44. //==========================================================================//
  45.  
  46. typedef LONG NTSTATUS;
  47.  
  48. #define VERSION_NUMBER      1
  49. #define SAVED_LOG           4
  50. #define SAVED_ALERT         2
  51. #define SAVED_GRAPH         1
  52. #define SAVED_WORKSPACE     (SAVED_GRAPH | SAVED_ALERT | SAVED_LOG)
  53. #define FNAMLEN             128
  54.  
  55.  
  56. #ifdef JAPAN
  57. #define szScalesFontFace         TEXT("System")
  58. #define iScalesFontHeight        10
  59. #define szScalesPrinterFontFace  TEXT("System")
  60. #else
  61. #define szScalesFontFace         TEXT("Helv")
  62. #define iScalesFontHeight        8
  63. #define szScalesPrinterFontFace  TEXT("Helvetica")
  64. #endif
  65.  
  66. #define iScalesPrinterFontHeight 12
  67. #define iTitlePrinterFontHeight  18
  68.  
  69. #define crLightGray              RGB (0xC0, 0xC0, 0xC0)
  70. #define crDarkGray               RGB (0x40, 0x40, 0x40) 
  71. #define crGray                   RGB (0x80, 0x80, 0x80)
  72. #define crRed                    RGB (0xFF, 0x00, 0x00)
  73. #define crGreen                  RGB (0x00, 0xFF, 0x00)
  74. #define crBlue                   RGB (0x00, 0x00, 0xFF)
  75. #define crBlack                  RGB (0x00, 0x00, 0x00)
  76. #define crWhite                  RGB (0xFF, 0xFF, 0xFF)
  77.  
  78.  
  79. #define LogTimerID               100
  80. #define AlertTimerID             200
  81. #define ChartTimerID             300
  82. #define ReportTimerID            400
  83.  
  84.  
  85. #define ChartTool                IDM_VIEWCHART
  86. #define AlertTool                IDM_VIEWALERT
  87. #define LogTool                  IDM_VIEWLOG
  88. #define ReportTool               IDM_VIEWREPORT
  89. #define AddTool                  IDM_TOOLBARADD
  90. #define EditTool                 IDM_TOOLBARMODIFY
  91. #define DeleteTool               IDM_TOOLBARDELETE
  92. #define RefreshTool              IDM_TOOLBARREFRESH
  93. #define BookmarkTool             IDM_OPTIONSBOOKMARK
  94. #define OptionsTool              IDM_TOOLBAROPTIONS
  95.  
  96.  
  97. #define szComputerPrefix         TEXT("\\\\")      // two backslashes
  98.  
  99.  
  100. #define WIDESTYLES               FALSE       // Don't allow wide styled lines
  101.  
  102. //
  103. // Determine if an argument is present by testing the value of the pointer
  104. // to the argument value.
  105. //
  106.  
  107. #define ARGUMENT_PRESENT(ArgumentPointer)    (\
  108.     (CHAR *)(ArgumentPointer) != (CHAR *)(NULL) )
  109.  
  110. //==========================================================================//
  111. //                                Global Data                               //
  112. //==========================================================================//
  113.  
  114.  
  115. #include "globals.h"
  116.  
  117.  
  118. //==========================================================================//
  119. //                             Exported Functions                           //
  120. //==========================================================================//
  121.  
  122.  
  123. LRESULT APIENTRY MainWndProc (HWND hwnd, 
  124.                               UINT message, 
  125.                               DWORD wParam, 
  126.                               LONG lParam) ;
  127.  
  128.  
  129. void SizePerfmonComponents (void) ;
  130.  
  131. #define TSPRINTF _stprintf
  132.  
  133. // #ifdef UNICODE
  134. // #define TSPRINTF swprintf
  135. // #else
  136. // #define TSPRINTF sprintf
  137. // #endif
  138.  
  139.