Browse Source

* fix for mantis #24920 try to properly update messages unit for win64.

git-svn-id: trunk@25639 -
marco 12 years ago
parent
commit
bca1e53840
1 changed files with 160 additions and 61 deletions
  1. 160 61
      rtl/win/wininc/messages.inc

+ 160 - 61
rtl/win/wininc/messages.inc

@@ -1298,15 +1298,9 @@
     TWMCopy             = Windows.TWMCopy;
     TWMCopy             = Windows.TWMCopy;
 {$else}
 {$else}
 
 
-{$ifdef cpu64}
-     HALFLRESULT = DWORD;
-     HALFPARAM = DWORD;
-     HALFPARAMBOOL = LONGBOOL;
-{$else}
-     HALFLRESULT = WORD;
-     HALFPARAM = WORD;
+     HALFLRESULT   = WORD;     // in win64, these remain 16-bit. the extra room is unused.
+     HALFPARAM     = WORD;
      HALFPARAMBOOL = WORDBOOL;
      HALFPARAMBOOL = WORDBOOL;
-{$endif}
 
 
      MSG = record
      MSG = record
           hwnd : HWND;
           hwnd : HWND;
@@ -1322,10 +1316,19 @@
      TMSG = MSG;
      TMSG = MSG;
      PMSG = ^MSG;
      PMSG = ^MSG;
 
 
+     // define a type for a field that only takes space if 64-bit.
+     TDWordFiller = record
+                       {$ifdef CPU64}
+                         filler : array[0..3] of byte;
+	               {$endif}
+                    end;
+
 
 
      PMessage = ^TMessage;
      PMessage = ^TMessage;
-     TMessage = record       {fields according to ICS}
+     TMessage = record
         msg      : UINT;
         msg      : UINT;
+        // Delphi docs say no filler here. Because next field is
+        // already 8 byte aligned in 64-bit?
         case longint of
         case longint of
           0: (
           0: (
               wParam : WPARAM;
               wParam : WPARAM;
@@ -1334,25 +1337,31 @@
              );
              );
           1: (
           1: (
               wParamlo,
               wParamlo,
-              wParamhi : HALFPARAM;  // Is there Windows type for half an wparam?
+              wParamhi : HALFPARAM;  // Is there Windows type for half an w/lparam?
+              wParamFiller : TDwordFiller;
               lParamlo,
               lParamlo,
               lParamhi : HALFPARAM;
               lParamhi : HALFPARAM;
+              lParamFiller : TDwordFiller;
               Resultlo,
               Resultlo,
               Resulthi : HALFLRESULT;
               Resulthi : HALFLRESULT;
+              ResultFiller : TDwordFiller;
              );
              );
        end;
        end;
 
 
     TWMSize = record
     TWMSize = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       SizeType : WPARAM;
       SizeType : WPARAM;
       Width : HALFPARAM;
       Width : HALFPARAM;
       Height : HALFPARAM;
       Height : HALFPARAM;
+      LParamfiller : TDWordFiller;
       Result : LRESULT;
       Result : LRESULT;
     End;
     End;
 
 
     TWMNoParams = record
     TWMNoParams = record
       Msg : UINT;
       Msg : UINT;
-      Unused : array[0..3] of HALFPARAM;
+      Unusedw : WPARAM;
+      Unusedl : LPARAM;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
@@ -1368,9 +1377,12 @@
 
 
     TWMUIState = record
     TWMUIState = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Action : Word;
       Action : Word;
       Flags : Word;
       Flags : Word;
-      Unused : HRESULT;
+      WParamFiller : TDwordFiller;
+      Unused  : LParam;
+      unused2 : LResult;
     end;
     end;
 
 
     TWMChangeUIState = TWMUIState;
     TWMChangeUIState = TWMUIState;
@@ -1378,9 +1390,12 @@
 
 
     TWMKey = record
     TWMKey = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       CharCode: Word;
       CharCode: Word;
       Unused: Word;
       Unused: Word;
+      WParamFiller : TDwordFiller;
       KeyData: Longint;
       KeyData: Longint;
+      LParamFiller : TDwordFiller;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
 
 
@@ -1393,8 +1408,10 @@
 
 
     TWMMenuChar = record
     TWMMenuChar = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       User: Char;
       User: Char;
       MenuFlag: Word;
       MenuFlag: Word;
+      WParamFiller : TDwordFiller;
       Menu: HMENU;
       Menu: HMENU;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
@@ -1407,8 +1424,10 @@
 
 
     TWMScroll = record
     TWMScroll = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       ScrollCode : HALFPARAM;
       ScrollCode : HALFPARAM;
       Pos : HALFPARAM;
       Pos : HALFPARAM;
+      WparamFiller : TDwordFiller;
       ScrollBar : HWND;
       ScrollBar : HWND;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
@@ -1418,7 +1437,8 @@
 
 
     TWMGetText = record
     TWMGetText = record
       Msg : UINT;
       Msg : UINT;
-      TextMax : LPARAM;
+      MsgFiller : TDwordFiller;
+      TextMax : WPARAM;
       Text : PChar;
       Text : PChar;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
@@ -1427,21 +1447,25 @@
 
 
     TWMKillFocus = record
     TWMKillFocus = record
        Msg : UINT;
        Msg : UINT;
+       MsgFiller : TDwordFiller;
        FocusedWnd : HWND;
        FocusedWnd : HWND;
-       UnUsed : WPARAM;
+       UnUsed : LPARAM;
        Result : LRESULT;
        Result : LRESULT;
     end;
     end;
 
 
     TWMSetCursor = record
     TWMSetCursor = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       CursorWnd : HWND;
       CursorWnd : HWND;
       HitTest : HALFPARAM;
       HitTest : HALFPARAM;
       MouseMsg : HALFPARAM;
       MouseMsg : HALFPARAM;
+      LParamFiller : TDwordFiller;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMSetFocus = record
     TWMSetFocus = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       FocusedWnd : HWND;
       FocusedWnd : HWND;
       Unused : WPARAM;
       Unused : WPARAM;
       Result : LRESULT;
       Result : LRESULT;
@@ -1449,22 +1473,27 @@
 
 
     TWMSetFont = record
     TWMSetFont = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Font : HFONT;
       Font : HFONT;
       Redraw : HALFPARAMBOOL;
       Redraw : HALFPARAMBOOL;
       Unused : HALFPARAM;
       Unused : HALFPARAM;
+      LParamFiller : TDwordFiller;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMShowWindow = record
     TWMShowWindow = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Show : HALFPARAMBOOL;
       Show : HALFPARAMBOOL;
       Unused : HALFPARAM;
       Unused : HALFPARAM;
-      Status : WPARAM;
+      WParamFiller : TDwordFiller;
+      Status : LPARAM;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMEraseBkgnd = record
     TWMEraseBkgnd = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       DC : HDC;
       DC : HDC;
       Unused : LPARAM;
       Unused : LPARAM;
       Result : LRESULT;
       Result : LRESULT;
@@ -1472,18 +1501,20 @@
 
 
     TWMNCHitTest = record
     TWMNCHitTest = record
       Msg : UINT;
       Msg : UINT;
-      Unused : Longint;
+      MsgFiller : TDwordFiller;
+      Unused : WParam;
       case Integer of
       case Integer of
         0: (XPos : Smallint;YPos : Smallint);
         0: (XPos : Smallint;YPos : Smallint);
-        1:  ( Pos : TSmallPoint;Result: LRESULT);
+        1: ( Pos : TSmallPoint;LParamFiller:TDwordFiller;Result: LRESULT);
     end;
     end;
 
 
     TWMMouse = record
     TWMMouse = record
       Msg : UINT;
       Msg : UINT;
-      Keys : Longint;
+      MsgFiller : TDwordFiller;
+      Keys : WParam;
       case Integer of
       case Integer of
         0: (XPos : Smallint;YPos : Smallint);
         0: (XPos : Smallint;YPos : Smallint);
-        1: (Pos : TSmallPoint;Result : LRESULT);
+        1: (Pos : TSmallPoint;LParamFiller:TDwordFiller;Result : LRESULT);
     end;
     end;
 
 
     TWMLButtonDblClk  = TWMMouse;
     TWMLButtonDblClk  = TWMMouse;
@@ -1495,18 +1526,23 @@
 
 
     TWMMouseWheel = record
     TWMMouseWheel = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Keys : SmallInt;
       Keys : SmallInt;
       WheelDelta : SmallInt;
       WheelDelta : SmallInt;
+      WParamFiller : TDwordFiller;
       case Integer of
       case Integer of
         0: (XPos : Smallint;YPos : Smallint);
         0: (XPos : Smallint;YPos : Smallint);
-        1: (Pos : TSmallPoint;Result : LRESULT);
+        1: (Pos : TSmallPoint;LParamFiller:TDwordFiller;Result : LRESULT);
     end;
     end;
 
 
     TWMNCHitMessage = record
     TWMNCHitMessage = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       HitTest : Longint;
       HitTest : Longint;
+      WParamFiller : TDwordFiller;
       XCursor : Smallint;
       XCursor : Smallint;
       YCursor : Smallint;
       YCursor : Smallint;
+      LParamFiller : TDwordFiller;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
@@ -1524,30 +1560,38 @@
 
 
     TWMPaint = record
     TWMPaint = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       DC : HDC;
       DC : HDC;
       Unused : Longint;
       Unused : Longint;
+      LParamFiller : TDwordFiller;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMCommand = record
     TWMCommand = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       ItemID : Word;
       ItemID : Word;
       NotifyCode : Word;
       NotifyCode : Word;
+      WParamFiller : TDwordFiller;
       Ctl : HWND;
       Ctl : HWND;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMNotify = record
     TWMNotify = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       IDCtrl : Longint;
       IDCtrl : Longint;
+      WParamFiller : TDwordFiller;
       NMHdr : PNMHdr;
       NMHdr : PNMHdr;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMPrint = record
     TWMPrint = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       DC : HDC;
       DC : HDC;
       Flags : Cardinal;
       Flags : Cardinal;
+      LParamFiller : TDwordFiller;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
@@ -1555,30 +1599,36 @@
 
 
     TWMWinIniChange = record
     TWMWinIniChange = record
       Msg : UINT;
       Msg : UINT;
-      Unused : Integer;
+      MsgFiller : TDwordFiller;
+      Unused : WParam;
       Section : PChar;
       Section : PChar;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMContextMenu = record
     TWMContextMenu = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       hWnd : HWND;
       hWnd : HWND;
       case Integer of
       case Integer of
         0: (XPos : Smallint;YPos : Smallint);
         0: (XPos : Smallint;YPos : Smallint);
-        1: (Pos : TSmallPoint;Result : LRESULT);
+        1: (Pos : TSmallPoint; LParamFiller : TDwordFiller;Result : LRESULT);
     end;
     end;
 
 
     TWMNCCalcSize = record
     TWMNCCalcSize = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       CalcValidRects : BOOL;
       CalcValidRects : BOOL;
+      WParamFiller : TDwordFiller;
       CalcSize_Params : PNCCalcSizeParams;
       CalcSize_Params : PNCCalcSizeParams;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMCharToItem = record
     TWMCharToItem = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Key : Word;
       Key : Word;
       CaretPos : Word;
       CaretPos : Word;
+      WParamFiller : TDwordFiller;
       ListBox: HWND;
       ListBox: HWND;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
@@ -1587,33 +1637,37 @@
 
 
     TWMParentNotify = record
     TWMParentNotify = record
       Msg : UINT;
       Msg : UINT;
-      case Event : Word of
-        WM_CREATE, WM_DESTROY: (ChildID : Word;ChildWnd : HWnd);
-        WM_LBUTTONDOWN, WM_MBUTTONDOWN, WM_RBUTTONDOWN: (Value : Word;XPos : Smallint;YPos : Smallint);
-        0: (Value1 : Word;Value2 : Longint;Result : LRESULT);
+      MsgFiller : TDwordFiller;
+      case Word of // moves into union to simply alignment rules.
+        WM_CREATE, WM_DESTROY: (Event : word;ChildID : Word; WParamFiller : TDwordFiller;ChildWnd : HWnd);
+        WM_LBUTTONDOWN, WM_MBUTTONDOWN, WM_RBUTTONDOWN: (dummy:word;Value : Word; WParamFiller2 : TDwordFiller;XPos : Smallint;YPos : Smallint);
+        0: (dummy2:word;Value1 : Word; WParamFiller3 : TDwordFiller;Value2 : Longint; LParamFiller : TDwordFiller;Result : LRESULT);
     end;
     end;
 
 
     TWMSysCommand = record
     TWMSysCommand = record
       Msg : UINT;
       Msg : UINT;
-      case CmdType : Longint of
+      MsgFiller : TDwordFiller;
+      case CmdType : WParam of
         SC_HOTKEY: (ActivateWnd : HWND);
         SC_HOTKEY: (ActivateWnd : HWND);
         SC_KEYMENU: (Key : Word);
         SC_KEYMENU: (Key : Word);
         SC_CLOSE, SC_HSCROLL, SC_MAXIMIZE, SC_MINIMIZE, SC_MOUSEMENU, SC_MOVE,
         SC_CLOSE, SC_HSCROLL, SC_MAXIMIZE, SC_MINIMIZE, SC_MOUSEMENU, SC_MOVE,
         SC_NEXTWINDOW, SC_PREVWINDOW, SC_RESTORE, SC_SCREENSAVE, SC_SIZE,
         SC_NEXTWINDOW, SC_PREVWINDOW, SC_RESTORE, SC_SCREENSAVE, SC_SIZE,
-        SC_TASKLIST, SC_VSCROLL: (XPos : Smallint; YPos : Smallint;Result : LRESULT);
+        SC_TASKLIST, SC_VSCROLL: (XPos : Smallint; YPos : Smallint; LParamFiller : TDwordFiller;Result : LRESULT);
     end;
     end;
 
 
     TWMMove = record
     TWMMove = record
       Msg : UINT;
       Msg : UINT;
-      Unused : Integer;
+      MsgFiller : TDwordFiller;
+      Unused : WParam;
       case Integer of
       case Integer of
         0: (XPos : Smallint;YPos : Smallint);
         0: (XPos : Smallint;YPos : Smallint);
-        1: (Pos : TSmallPoint;Result : LRESULT);
+        1: (Pos : TSmallPoint; LParamFiller : TDwordFiller;Result : LRESULT);
     end;
     end;
 
 
     TWMWindowPosMsg = record
     TWMWindowPosMsg = record
       Msg : UINT;
       Msg : UINT;
-      Unused : Integer;
+      MsgFiller : TDwordFiller;
+      Unused : WParam;
       WindowPos : PWindowPos;
       WindowPos : PWindowPos;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
@@ -1623,6 +1677,7 @@
 
 
     TWMCompareItem = record
     TWMCompareItem = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Ctl : HWnd;
       Ctl : HWnd;
       CompareItemStruct : PCompareItemStruct;
       CompareItemStruct : PCompareItemStruct;
       Result : LRESULT;
       Result : LRESULT;
@@ -1630,6 +1685,7 @@
 
 
     TWMDeleteItem = record
     TWMDeleteItem = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Ctl : HWND;
       Ctl : HWND;
       DeleteItemStruct : PDeleteItemStruct;
       DeleteItemStruct : PDeleteItemStruct;
       Result : LRESULT;
       Result : LRESULT;
@@ -1637,6 +1693,7 @@
 
 
     TWMDrawItem = record
     TWMDrawItem = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Ctl : HWND;
       Ctl : HWND;
       DrawItemStruct : PDrawItemStruct;
       DrawItemStruct : PDrawItemStruct;
       Result : LRESULT;
       Result : LRESULT;
@@ -1644,6 +1701,7 @@
 
 
     TWMMeasureItem = record
     TWMMeasureItem = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       IDCtl : HWnd;
       IDCtl : HWnd;
       MeasureItemStruct : PMeasureItemStruct;
       MeasureItemStruct : PMeasureItemStruct;
       Result : LRESULT
       Result : LRESULT
@@ -1651,44 +1709,54 @@
 
 
     TWMNCCreate = record
     TWMNCCreate = record
       Msg : UINT;
       Msg : UINT;
-      Unused : Integer;
+      MsgFiller : TDwordFiller;
+      Unused : WParam;
       CreateStruct : PCreateStruct;
       CreateStruct : PCreateStruct;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMInitMenuPopup = record
     TWMInitMenuPopup = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       MenuPopup : HMENU;
       MenuPopup : HMENU;
       Pos : Smallint;
       Pos : Smallint;
       SystemMenu : WordBool;
       SystemMenu : WordBool;
+      LParamFiller : TDwordFiller;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMMenuSelect = record
     TWMMenuSelect = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       IDItem : Word;
       IDItem : Word;
       MenuFlag : Word;
       MenuFlag : Word;
+      WParamFiller : TDwordFiller;
       Menu: HMENU;
       Menu: HMENU;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMActivate = record
     TWMActivate = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Active : Word;
       Active : Word;
       Minimized : WordBool;
       Minimized : WordBool;
+      WParamFiller : TDwordFiller;
       ActiveWindow : HWND;
       ActiveWindow : HWND;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMQueryEndSession = record
     TWMQueryEndSession = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Source : Longint;
       Source : Longint;
-      Unused : Longint;
+      WParamFiller : TDwordFiller;
+      Unused : LParam;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMMDIActivate = record
     TWMMDIActivate = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       case Integer of
       case Integer of
         0: (ChildWnd : HWND);
         0: (ChildWnd : HWND);
         1: (DeactiveWnd : HWND;ActiveWnd : HWND;Result: LRESULT);
         1: (DeactiveWnd : HWND;ActiveWnd : HWND;Result: LRESULT);
@@ -1696,42 +1764,51 @@
 
 
     TWMNextDlgCtl = record
     TWMNextDlgCtl = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       CtlFocus : Longint;
       CtlFocus : Longint;
+      WParamFiller : TDwordFiller;
       Handle : WordBool;
       Handle : WordBool;
       Unused : Word;
       Unused : Word;
+      LParamFiller : TDwordFiller;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMHelp = record
     TWMHelp = record
       Msg : UINT;
       Msg : UINT;
-      Unused : Integer;
+      MsgFiller : TDwordFiller;
+      Unused : WParam;
       HelpInfo : PHelpInfo;
       HelpInfo : PHelpInfo;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMGetMinMaxInfo = record
     TWMGetMinMaxInfo = record
       Msg : UINT;
       Msg : UINT;
-      Unused : Integer;
+      MsgFiller : TDwordFiller;
+      Unused : WParam;
       MinMaxInfo : PMinMaxInfo;
       MinMaxInfo : PMinMaxInfo;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMSettingChange = record
     TWMSettingChange = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Flag : Integer;
       Flag : Integer;
+      WParamFiller : TDwordFiller;
       Section : PChar;
       Section : PChar;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMCreate = record
     TWMCreate = record
       Msg : UINT;
       Msg : UINT;
-      Unused : Integer;
+      MsgFiller : TDwordFiller;
+      Unused : WParam;
       CreateStruct : PCreateStruct;
       CreateStruct : PCreateStruct;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMCtlColor = record
     TWMCtlColor = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       ChildDC : HDC;
       ChildDC : HDC;
       ChildWnd : HWND;
       ChildWnd : HWND;
       Result : LRESULT;
       Result : LRESULT;
@@ -1747,27 +1824,32 @@
 
 
     TWMInitDialog = record
     TWMInitDialog = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       Focus : HWND;
       Focus : HWND;
       InitParam : Longint;
       InitParam : Longint;
+      LParamFiller : TDwordFiller;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMNCPaint = record
     TWMNCPaint = record
       Msg : UINT;
       Msg : UINT;
+      MsgFiller : TDwordFiller;
       RGN : HRGN;
       RGN : HRGN;
-      Unused : WPARAM;
+      Unused : LPARAM;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMSetText = record
     TWMSetText = record
       Msg : UINT;
       Msg : UINT;
-      Unused : Longint;
+      MsgFiller : TDwordFiller;
+      Unused : WParam;
       Text : PChar;
       Text : PChar;
       Result : LRESULT;
       Result : LRESULT;
     end;
     end;
 
 
     TWMSizeClipboard = record
     TWMSizeClipboard = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       Viewer: HWND;
       Viewer: HWND;
       RC: THandle;
       RC: THandle;
       Result: LRESULT;
       Result: LRESULT;
@@ -1775,67 +1857,77 @@
 
 
     TWMSpoolerStatus = record
     TWMSpoolerStatus = record
       Msg: UINT;
       Msg: UINT;
-      JobStatus: LPARAM;
-      JobsLeft: WPARAM;
-      Unused: WPARAM;
+      MsgFiller: TDwordFiller;
+      JobStatus: WPARAM;
+      JobsLeft : word;
+      Unused   : word;
+      LParamFiller : TDwordFiller;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
-  
+
     TWMStyleChange = record
     TWMStyleChange = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       StyleType: LPARAM;
       StyleType: LPARAM;
       StyleStruct: PStyleStruct;
       StyleStruct: PStyleStruct;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
-  
+
     TWMStyleChanged = TWMStyleChange;
     TWMStyleChanged = TWMStyleChange;
     TWMStyleChanging = TWMStyleChange;
     TWMStyleChanging = TWMStyleChange;
-  
-  
+
+
     TWMSysDeadChar = record
     TWMSysDeadChar = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       CharCode: WPARAM;
       CharCode: WPARAM;
-      Unused: WPARAM;
       KeyData: LPARAM;
       KeyData: LPARAM;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
-  
+
     TWMSystemError = record
     TWMSystemError = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       ErrSpec: WPARAM;
       ErrSpec: WPARAM;
       Unused: LPARAM;
       Unused: LPARAM;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
-  
+
     TWMTimeChange = TWMNoParams;
     TWMTimeChange = TWMNoParams;
-  
+
     TWMTimer = record
     TWMTimer = record
       Msg: UINT;
       Msg: UINT;
-      TimerID: LPARAM;
+      MsgFiller : TDwordFiller;
+      TimerID: WPARAM;
       TimerProc: TFarProc;
       TimerProc: TFarProc;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
-  
+
     TWMUndo = TWMNoParams;
     TWMUndo = TWMNoParams;
-  
+
     TWMVScrollClipboard = record
     TWMVScrollClipboard = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       Viewer: HWND;
       Viewer: HWND;
-      ScollCode: WPARAM;
-      ThumbPos: WPARAM;
+      ScollCode: word;
+      ThumbPos: word;
+      LParamFiller : TDwordFiller;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
-  
+
     TWMDisplayChange = record
     TWMDisplayChange = record
       Msg: UINT;
       Msg: UINT;
-      BitsPerPixel: Integer;
-      Width: WPARAM;
-      Height: WPARAM;
+      MsgFiller : TDwordFiller;
+      BitsPerPixel: WParam;
+      Width: Word;
+      Height: Word;
+      LParamFiller : TDwordFiller;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
 
 
     TWMDropFiles = record
     TWMDropFiles = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       Drop: THANDLE;
       Drop: THANDLE;
       Unused: LPARAM;
       Unused: LPARAM;
       Result: LRESULT;
       Result: LRESULT;
@@ -1843,34 +1935,41 @@
 
 
     TWMEnable = record
     TWMEnable = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       Enabled: BOOL;
       Enabled: BOOL;
+      WParamFiller : TDwordFiller;
       Unused: LPARAM;
       Unused: LPARAM;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
 
 
     TWMMouseActivate = record
     TWMMouseActivate = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       TopLevel: HWND;
       TopLevel: HWND;
       HitTestCode: Word;
       HitTestCode: Word;
       MouseMsg: Word;
       MouseMsg: Word;
+      LParamFiller : TDwordFiller;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
 
 
     TWMEndSession = record
     TWMEndSession = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       EndSession: BOOL;
       EndSession: BOOL;
+      WParamFiller : TDwordFiller;
       Unused: LPARAM;
       Unused: LPARAM;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
-    
+
     TWMActivateApp = record
     TWMActivateApp = record
       Msg: UINT;
       Msg: UINT;
+      MsgFiller : TDwordFiller;
       Active: BOOL;
       Active: BOOL;
-      ThreadId: WPARAM;
+      WParamFiller : TDwordFiller;
+      ThreadId: LPARAM;
       Result: LRESULT;
       Result: LRESULT;
     end;
     end;
 {$endif messagesunit}
 {$endif messagesunit}
-    
 
 
 {$endif read_interface}
 {$endif read_interface}