home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / OWLINC.PAK / COMPAT.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  3KB  |  98 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // (C) Copyright 1992, 1994 by Borland International, All Rights Reserved
  4. //
  5. //----------------------------------------------------------------------------
  6. #if !defined(OWL_COMPAT_H)
  7. #define OWL_COMPAT_H
  8.  
  9. #if defined(__WIN32__)
  10. #pragma message Check maximum identifier length setting.  Must equal 55 or greater.
  11. #endif
  12.  
  13.  
  14. #if !defined(BI_OLDNAMES)
  15. # define BI_OLDNAMES
  16. #endif
  17.  
  18. #include <owl/owlpch.h>
  19.  
  20. #if !defined(OWL_OWLDEFS_H)
  21. # include <owl/owldefs.h>
  22. #endif
  23.  
  24. struct TMessage {
  25.   HWND  Receiver;
  26.   uint16  Message;
  27.  
  28.   union {
  29.     uint16  WParam;
  30.  
  31.     struct tagWP {
  32.       uint8 Lo;
  33.       uint8 Hi;
  34.     } WP;
  35.   };
  36.  
  37.   union {
  38.     uint32  LParam;
  39.  
  40.     struct tagLP {
  41.       uint16 Lo;
  42.       uint16 Hi;
  43.     } LP;
  44.   };
  45.  
  46.   long  Result;
  47. };
  48.  
  49. class _OWLCLASS TWindow;
  50. TMessage _OWLFUNC __GetTMessageWin(TWindow* win);
  51. #define __GetTMessage() __GetTMessageWin(this)
  52.  
  53. //
  54. // Constants for application messages
  55. //
  56. #define WM_FIRST        0x0000  // 0x0000- 0x7FFF window messages
  57. #define WM_INTERNAL     0x7F00  // 0x7F00- 0x7FFF reserved for internal use
  58. #define ID_FIRST        0x8000  // 0x8000- 0x8FFF child id messages
  59. #define ID_INTERNAL     0x8F00  // 0x8F00- 0x8FFF reserved for internal use
  60. #define NF_FIRST        0x9000  // 0x9000- 0x9FFF notification messages
  61. #define NF_INTERNAL     0x9F00  // 0x9F00- 0x9FFF reserved for internal use
  62. #define CM_FIRST        0xA000  // 0xA000- 0xFFFF command messages
  63. #define CM_INTERNAL     0xFF00  // 0xFF00- 0xFFFF reserved for internal use
  64. #define WM_COUNT        0x8000  // num of window msgs
  65. #define ID_COUNT        0x1000  // num of child id msgs
  66. #define NF_COUNT        0x1000  // num of notification msgs
  67. #define CM_COUNT        0x6000  // num of command msgs
  68.  
  69. #define WM_RESERVED             WM_INTERNAL - WM_FIRST
  70.  
  71. #define ID_RESERVED             ID_INTERNAL - ID_FIRST
  72. #define ID_FIRSTMDICHILD        ID_RESERVED + 1
  73. #define ID_MDICLIENT            ID_RESERVED + 2
  74.  
  75. #define CM_RESERVED             CM_INTERNAL - CM_FIRST
  76.  
  77.  
  78. //
  79. // Error conditions
  80. //
  81. #define EM_INVALIDCHILD         -1
  82. #define EM_INVALIDCLIENT        -2
  83. #define EM_INVALIDMAINWINDOW    -3
  84. #define EM_INVALIDMODULE        -4
  85. #define EM_INVALIDWINDOW        -5
  86. #define EM_OUTOFMEMORY          -6
  87.  
  88.  
  89. typedef int _FAR & Rint;
  90. typedef int _FAR * Pint;
  91. typedef void _FAR * Pvoid;
  92. typedef void _FAR * _FAR & RPvoid;
  93. typedef char _FAR * Pchar;
  94. typedef const char _FAR * PCchar;
  95. typedef const void _FAR * PCvoid;
  96.  
  97. #endif  // OWL_COMPAT_H
  98.