home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / advanced / oldbars / globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.1 KB  |  64 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. /////////////////////////////////////////////////////////////////////////////
  12. // Auxiliary System/Screen metrics
  13.  
  14. struct GLOBAL_DATA
  15. {
  16.     // system metrics
  17.     int cxBorder2, cyBorder2;
  18.  
  19.     // device metrics for screen
  20.     int cxPixelsPerInch, cyPixelsPerInch;
  21.  
  22.     // solid brushes with convenient gray colors and system colors
  23.     HBRUSH hbrLtGray, hbrDkGray;
  24.     HBRUSH hbrBtnHilite, hbrBtnFace, hbrBtnShadow;
  25.     HBRUSH hbrWindowFrame;
  26.     HPEN hpenBtnHilite, hpenBtnShadow, hpenBtnText;
  27.  
  28.     // color values of system colors used for CToolBar
  29.     COLORREF clrBtnFace, clrBtnShadow, clrBtnHilite;
  30.     COLORREF clrBtnText, clrWindowFrame;
  31.  
  32.     // special GDI objects allocated on demand
  33.     HFONT   hStatusFont;
  34.     HFONT   hToolTipsFont;
  35.  
  36.     // other system information
  37.     UINT    nWinVer;        // Major.Minor version numbers
  38.     BOOL    bWin32s;        // TRUE if Win32s (or Windows 95)
  39.     BOOL    bWin4;          // TRUE if Windows 4.0
  40.     BOOL    bNotWin4;       // TRUE if not Windows 4.0
  41.     BOOL    bSmCaption;     // TRUE if WS_EX_SMCAPTION is supported
  42.     BOOL    bWin31;         // TRUE if actually Win32s on Windows 3.1
  43.  
  44. // Implementation
  45.     GLOBAL_DATA();
  46.     ~GLOBAL_DATA();
  47.     void UpdateSysColors();
  48.     void UpdateSysMetrics();
  49. };
  50.  
  51. extern GLOBAL_DATA globalData;
  52.  
  53. // Note: afxData.cxBorder and afxData.cyBorder aren't used anymore
  54. #define CX_BORDER   1
  55. #define CY_BORDER   1
  56.  
  57. // determine number of elements in an array (not bytes)
  58. #define _countof(array) (sizeof(array)/sizeof(array[0]))
  59.  
  60. BOOL AFXAPI AfxCustomLogFont(UINT nIDS, LOGFONT* pLogFont);
  61. void AFXAPI AfxDeleteObject(HGDIOBJ* pObject);
  62.  
  63. /////////////////////////////////////////////////////////////////////////////
  64.