2 * Win32 structure conversion functions
4 * Copyright 1996 Martin von Loewis
14 void STRUCT32_MSG16to32(const MSG16 *msg16,MSG32 *msg32)
16 msg32->hwnd=(HWND32)msg16->hwnd;
17 msg32->message=msg16->message;
18 msg32->wParam=msg16->wParam;
19 msg32->lParam=msg16->lParam;
20 msg32->time=msg16->time;
21 msg32->pt.x=msg16->pt.x;
22 msg32->pt.y=msg16->pt.y;
25 void STRUCT32_MSG32to16(const MSG32 *msg32,MSG16 *msg16)
27 msg16->hwnd=(HWND16)msg32->hwnd;
28 msg16->message=msg32->message;
29 msg16->wParam=msg32->wParam;
30 msg16->lParam=msg32->lParam;
31 msg16->time=msg32->time;
32 msg16->pt.x=msg32->pt.x;
33 msg16->pt.y=msg32->pt.y;
36 void STRUCT32_MINMAXINFO32to16( const MINMAXINFO32 *from, MINMAXINFO16 *to )
38 CONV_POINT32TO16( &from->ptReserved, &to->ptReserved );
39 CONV_POINT32TO16( &from->ptMaxSize, &to->ptMaxSize );
40 CONV_POINT32TO16( &from->ptMaxPosition, &to->ptMaxPosition );
41 CONV_POINT32TO16( &from->ptMinTrackSize, &to->ptMinTrackSize );
42 CONV_POINT32TO16( &from->ptMaxTrackSize, &to->ptMaxTrackSize );
45 void STRUCT32_MINMAXINFO16to32( const MINMAXINFO16 *from, MINMAXINFO32 *to )
47 CONV_POINT16TO32( &from->ptReserved, &to->ptReserved );
48 CONV_POINT16TO32( &from->ptMaxSize, &to->ptMaxSize );
49 CONV_POINT16TO32( &from->ptMaxPosition, &to->ptMaxPosition );
50 CONV_POINT16TO32( &from->ptMinTrackSize, &to->ptMinTrackSize );
51 CONV_POINT16TO32( &from->ptMaxTrackSize, &to->ptMaxTrackSize );
54 void STRUCT32_WINDOWPOS32to16( const WINDOWPOS32* from, WINDOWPOS16* to )
56 to->hwnd = (HWND16)from->hwnd;
57 to->hwndInsertAfter = (HWND16)from->hwndInsertAfter;
58 to->x = (INT16)from->x;
59 to->y = (INT16)from->y;
60 to->cx = (INT16)from->cx;
61 to->cy = (INT16)from->cy;
62 to->flags = (UINT16)from->flags;
65 void STRUCT32_WINDOWPOS16to32( const WINDOWPOS16* from, WINDOWPOS32* to )
67 to->hwnd = (HWND32)from->hwnd;
68 to->hwndInsertAfter = (HWND32)from->hwndInsertAfter;
69 to->x = (INT32)from->x;
70 to->y = (INT32)from->y;
71 to->cx = (INT32)from->cx;
72 to->cy = (INT32)from->cy;
73 to->flags = (UINT32)from->flags;
76 void STRUCT32_NCCALCSIZE32to16Flat( const NCCALCSIZE_PARAMS32* from,
77 NCCALCSIZE_PARAMS16* to, int validRects )
79 CONV_RECT32TO16( &from->rgrc[0], &to->rgrc[0] );
82 CONV_RECT32TO16( &from->rgrc[1], &to->rgrc[1] );
83 CONV_RECT32TO16( &from->rgrc[2], &to->rgrc[2] );
87 void STRUCT32_NCCALCSIZE16to32Flat( const NCCALCSIZE_PARAMS16* from,
88 NCCALCSIZE_PARAMS32* to, int validRects )
90 CONV_RECT16TO32( &from->rgrc[0], &to->rgrc[0] );
93 CONV_RECT32TO16( &from->rgrc[1], &to->rgrc[1] );
94 CONV_RECT32TO16( &from->rgrc[2], &to->rgrc[2] );
98 /* The strings are not copied */
99 void STRUCT32_CREATESTRUCT32Ato16( const CREATESTRUCT32A* from,
102 to->lpCreateParams = from->lpCreateParams;
103 to->hInstance = (HINSTANCE16)from->hInstance;
104 to->hMenu = (HMENU16)from->hMenu;
105 to->hwndParent = (HWND16)from->hwndParent;
106 to->cy = (INT16)from->cy;
107 to->cx = (INT16)from->cx;
108 to->y = (INT16)from->y;
109 to->x = (INT16)from->x;
110 to->style = from->style;
111 to->dwExStyle = from->dwExStyle;
114 void STRUCT32_CREATESTRUCT16to32A( const CREATESTRUCT16* from,
115 CREATESTRUCT32A *to )
117 to->lpCreateParams = from->lpCreateParams;
118 to->hInstance = (HINSTANCE32)from->hInstance;
119 to->hMenu = (HMENU32)from->hMenu;
120 to->hwndParent = (HWND32)from->hwndParent;
121 to->cy = (INT32)from->cy;
122 to->cx = (INT32)from->cx;
123 to->y = (INT32)from->y;
124 to->x = (INT32)from->x;
125 to->style = from->style;
126 to->dwExStyle = from->dwExStyle;
129 /* The strings are not copied */
130 void STRUCT32_MDICREATESTRUCT32Ato16( const MDICREATESTRUCT32A* from,
131 MDICREATESTRUCT16* to )
133 to->hOwner = (HINSTANCE16)from->hOwner;
134 to->x = (INT16)from->x;
135 to->y = (INT16)from->y;
136 to->cx = (INT16)from->cx;
137 to->cy = (INT16)from->cy;
138 to->style = from->style;
139 to->lParam = from->lParam;
142 void STRUCT32_MDICREATESTRUCT16to32A( const MDICREATESTRUCT16* from,
143 MDICREATESTRUCT32A *to )
145 to->hOwner = (HINSTANCE32)from->hOwner;
146 to->x = (INT32)from->x;
147 to->y = (INT32)from->y;
148 to->cx = (INT32)from->cx;
149 to->cy = (INT32)from->cy;
150 to->style = from->style;
151 to->lParam = from->lParam;