Browse Source

* including in both messages and windows caused problems (expected
windows.msg, got message.msg and vice versa. Solved by aliasing

marco 21 years ago
parent
commit
e1828acc9c
2 changed files with 35 additions and 1 deletions
  1. 1 0
      rtl/win32/messages.pp
  2. 34 1
      rtl/win32/wininc/messages.inc

+ 1 - 0
rtl/win32/messages.pp

@@ -7,6 +7,7 @@ interface
     windows;
     windows;
 
 
 {$DEFINE read_interface}
 {$DEFINE read_interface}
+{$DEFINE MESSAGESUNIT}
 {$I messages.inc}
 {$I messages.inc}
 
 
 implementation
 implementation

+ 34 - 1
rtl/win32/wininc/messages.inc

@@ -1156,6 +1156,33 @@
      WM_XBUTTONDBLCLK = 525;
      WM_XBUTTONDBLCLK = 525;
 
 
 Type
 Type
+{$ifdef MESSAGESUNIT}
+
+    MSG 		= Windows.MSG;
+    TMessage 		= Windows.TMessage;
+    TWMSize 		= Windows.TWMSize;
+    TWMNoParams 	= Windows.TWMNoParams;
+    TWMScroll 		= Windows.TWMScroll;
+    TWMGetText 		= Windows.TWMGetText;
+    TWMKillFocus 	= Windows.TWMKillFocus;
+    TWMSetCursor 	= Windows.TWMSetCursor;
+    TWMSetFocus 	= Windows.TWMSetFocus;
+    TWMSetFont 		= Windows.TWMSetFont;
+    TWMShowWindow 	= Windows.TWMShowWindow;
+    TWMEraseBkgnd 	= Windows.TWMEraseBkgnd;
+    LPMSG 		= Windows.MSG;
+    tagMSG 		= Windows.tagMSG;
+    TMSG 		= Windows.TMSG;
+    PMSG 		= Windows.PMSG;
+    PMessage 		= Windows.PMessage;
+    TWMGetDlgCode 	= TWMNoParams;
+    TWMFontChange 	= TWMNoParams;
+    TWMGetFont 		= TWMNoParams;
+    TWMHScroll 		= TWMScroll;
+    TWMVScroll 		= TWMScroll;
+    TWMGetTextLength 	= TWMNoParams;
+
+{$else}
 
 
      MSG = record
      MSG = record
           hwnd : HWND;
           hwnd : HWND;
@@ -1273,11 +1300,17 @@ Type
       Result: Longint;
       Result: Longint;
     end;
     end;
 
 
+{$endif messagesunit}
+
 {$endif read_interface}
 {$endif read_interface}
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.11  2003-12-06 15:56:35  marco
+  Revision 1.12  2004-08-22 11:12:24  marco
+   * including in both messages and windows caused problems (expected
+  	windows.msg, got message.msg and vice versa. Solved by aliasing
+
+  Revision 1.11  2003/12/06 15:56:35  marco
    * typo fix
    * typo fix
 
 
   Revision 1.10  2003/12/06 15:53:21  marco
   Revision 1.10  2003/12/06 15:53:21  marco