home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / C / MDIDEMO / WINDOWS.H < prev   
C/C++ Source or Header  |  1993-12-01  |  5KB  |  124 lines

  1. // ==========================================================================
  2. // 
  3. //  Logfile:    windows.h   
  4. //
  5. //  Desc:       This file provides portions of Windows compatability
  6. //              not found in the standard MEWEL header files.
  7. // 
  8. //  Log:
  9. //  Sat 06 Jan 1990   DavidHollifield
  10. //      Create.
  11. //
  12. //  Tue 13 Feb 1990   DavidHollifield
  13. //      - Added new WS_CAPTION which adds WIN_MOVEBOX capability.
  14. //      - Added MoveWindow() macro.
  15. //
  16. // ==========================================================================
  17.  
  18. /* Notes -
  19.  */
  20.  
  21. #if     !defined(H_WINDOWS)
  22. #define H_WINDOWS
  23.  
  24. // ==========================================================================
  25. //                               Header Files
  26. // ==========================================================================
  27. #include <window.h>
  28. #include <mdi.h>
  29.  
  30. #undef   _CreateWindow
  31.  
  32. // ==========================================================================
  33. //                               Definitions
  34. // ==========================================================================
  35.  
  36. #define SW_SHOWNORMAL       SW_SHOW
  37. #define BS_PUSHBUTTON       0x00L
  38.  
  39. // Window Style redefinitions
  40. //
  41. #undef  WS_CAPTION
  42. #define WS_CAPTION            (WIN_TITLEBAR | WIN_MOVEBOX)
  43.  
  44. #undef  LBS_STANDARD        
  45. #define LBS_STANDARD        (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  46.  
  47. // ==========================================================================
  48. //                                Structures
  49. // ==========================================================================
  50.  
  51. // TextMetric Structure
  52. //
  53. typedef struct tagTEXTMETRIC
  54. {
  55.     int     tmHeight;
  56.     int     tmAscent;
  57.     int     tmDescent;
  58.     int     tmInternalLeading;
  59.     int     tmExternalLeading;
  60.     int     tmAveCharWidth;
  61.     int     tmMaxCharWidth;
  62.     int     tmWeight;
  63.     BYTE    tmItalic;
  64.     BYTE    tmUnderlined;
  65.     BYTE    tmStruckOut;
  66.     BYTE    tmFirstChar;
  67.     BYTE    tmLastChar;
  68.     BYTE    tmDefaultChar;
  69.     BYTE    tmBreakChar;
  70.     BYTE    tmPitchAndFamily;
  71.     BYTE    tmCharSet;
  72.     int     tmOverhang;
  73.     int     tmDigitizedAspectX;
  74.     int     tmDigitizedAspectY;
  75. } TEXTMETRIC;
  76. typedef TEXTMETRIC        *PTEXTMETRIC;
  77. typedef TEXTMETRIC NEAR *NPTEXTMETRIC;
  78. typedef TEXTMETRIC FAR    *LPTEXTMETRIC;
  79.  
  80. typedef DWORD   COLORREF;
  81.  
  82. // ==========================================================================
  83. //                          External Declarations
  84. // ==========================================================================
  85.  
  86. // ==========================================================================
  87. //                            Data Declarations
  88. // ==========================================================================
  89.  
  90. // ==========================================================================
  91. //                           Function Prototypes
  92. // ==========================================================================
  93.  
  94. // ==========================================================================
  95. //                            Macro Declarations
  96. // ==========================================================================
  97.  
  98. #define GetTextMetrics(hDC, ptm)                                            \
  99.         {                                                                   \
  100.             (ptm)->tmHeight           = 1;                                  \
  101.             (ptm)->tmAscent           = 1;                                  \
  102.             (ptm)->tmDescent          = 0;                                  \
  103.             (ptm)->tmInternalLeading  = 0;                                  \
  104.             (ptm)->tmExternalLeading  = 0;                                  \
  105.             (ptm)->tmAveCharWidth     = 1;                                  \
  106.             (ptm)->tmMaxCharWidth     = 1;                                  \
  107.             (ptm)->tmWeight           = 0;                                  \
  108.             (ptm)->tmItalic           = 0;                                  \
  109.             (ptm)->tmUnderlined       = 0;                                  \
  110.             (ptm)->tmStruckOut        = 0;                                  \
  111.             (ptm)->tmFirstChar        = 0x00;                               \
  112.             (ptm)->tmLastChar         = 0xFF;                               \
  113.             (ptm)->tmDefaultChar      = 0x20;                               \
  114.             (ptm)->tmBreakChar        = 0x0A;                               \
  115.             (ptm)->tmPitchAndFamily   = 0;                                  \
  116.             (ptm)->tmCharSet          = 0;                                  \
  117.             (ptm)->tmOverhang         = 0;                                  \
  118.             (ptm)->tmDigitizedAspectX = 0;                                  \
  119.             (ptm)->tmDigitizedAspectY = 0;                                  \
  120.         }
  121.  
  122. #endif
  123.  
  124.