Added missing dependency for 16-bit resource files.
[wine/multimedia.git] / windows / struct32.c
blob853ab1fafbfcbea3efbf6cf6a47c3bcc3db44236
1 /*
2 * Win32 structure conversion functions
4 * Copyright 1996 Martin von Loewis
5 */
7 #include "struct32.h"
8 #include "winerror.h"
10 void STRUCT32_MSG16to32(const MSG16 *msg16,MSG *msg32)
12 msg32->hwnd=(HWND)msg16->hwnd;
13 msg32->message=msg16->message;
14 msg32->wParam=msg16->wParam;
15 msg32->lParam=msg16->lParam;
16 msg32->time=msg16->time;
17 msg32->pt.x=msg16->pt.x;
18 msg32->pt.y=msg16->pt.y;
21 void STRUCT32_MSG32to16(const MSG *msg32,MSG16 *msg16)
23 msg16->hwnd=(HWND16)msg32->hwnd;
24 msg16->message=msg32->message;
25 msg16->wParam=msg32->wParam;
26 msg16->lParam=msg32->lParam;
27 msg16->time=msg32->time;
28 msg16->pt.x=msg32->pt.x;
29 msg16->pt.y=msg32->pt.y;
32 void STRUCT32_MINMAXINFO32to16( const MINMAXINFO *from, MINMAXINFO16 *to )
34 CONV_POINT32TO16( &from->ptReserved, &to->ptReserved );
35 CONV_POINT32TO16( &from->ptMaxSize, &to->ptMaxSize );
36 CONV_POINT32TO16( &from->ptMaxPosition, &to->ptMaxPosition );
37 CONV_POINT32TO16( &from->ptMinTrackSize, &to->ptMinTrackSize );
38 CONV_POINT32TO16( &from->ptMaxTrackSize, &to->ptMaxTrackSize );
41 void STRUCT32_MINMAXINFO16to32( const MINMAXINFO16 *from, MINMAXINFO *to )
43 CONV_POINT16TO32( &from->ptReserved, &to->ptReserved );
44 CONV_POINT16TO32( &from->ptMaxSize, &to->ptMaxSize );
45 CONV_POINT16TO32( &from->ptMaxPosition, &to->ptMaxPosition );
46 CONV_POINT16TO32( &from->ptMinTrackSize, &to->ptMinTrackSize );
47 CONV_POINT16TO32( &from->ptMaxTrackSize, &to->ptMaxTrackSize );
50 void STRUCT32_WINDOWPOS32to16( const WINDOWPOS* from, WINDOWPOS16* to )
52 to->hwnd = (HWND16)from->hwnd;
53 to->hwndInsertAfter = (HWND16)from->hwndInsertAfter;
54 to->x = (INT16)from->x;
55 to->y = (INT16)from->y;
56 to->cx = (INT16)from->cx;
57 to->cy = (INT16)from->cy;
58 to->flags = (UINT16)from->flags;
61 void STRUCT32_WINDOWPOS16to32( const WINDOWPOS16* from, WINDOWPOS* to )
63 to->hwnd = (HWND)from->hwnd;
64 to->hwndInsertAfter = (HWND)from->hwndInsertAfter;
65 to->x = (INT)from->x;
66 to->y = (INT)from->y;
67 to->cx = (INT)from->cx;
68 to->cy = (INT)from->cy;
69 to->flags = (UINT)from->flags;
72 /* The strings are not copied */
73 void STRUCT32_CREATESTRUCT32Ato16( const CREATESTRUCTA* from,
74 CREATESTRUCT16* to )
76 to->lpCreateParams = from->lpCreateParams;
77 to->hInstance = (HINSTANCE16)from->hInstance;
78 to->hMenu = (HMENU16)from->hMenu;
79 to->hwndParent = (HWND16)from->hwndParent;
80 to->cy = (INT16)from->cy;
81 to->cx = (INT16)from->cx;
82 to->y = (INT16)from->y;
83 to->x = (INT16)from->x;
84 to->style = from->style;
85 to->dwExStyle = from->dwExStyle;
88 void STRUCT32_CREATESTRUCT16to32A( const CREATESTRUCT16* from,
89 CREATESTRUCTA *to )
91 to->lpCreateParams = from->lpCreateParams;
92 to->hInstance = (HINSTANCE)from->hInstance;
93 to->hMenu = (HMENU)from->hMenu;
94 to->hwndParent = (HWND)from->hwndParent;
95 to->cy = (INT)from->cy;
96 to->cx = (INT)from->cx;
97 to->y = (INT)from->y;
98 to->x = (INT)from->x;
99 to->style = from->style;
100 to->dwExStyle = from->dwExStyle;
103 /* The strings are not copied */
104 void STRUCT32_MDICREATESTRUCT32Ato16( const MDICREATESTRUCTA* from,
105 MDICREATESTRUCT16* to )
107 to->hOwner = (HINSTANCE16)from->hOwner;
108 to->x = (INT16)from->x;
109 to->y = (INT16)from->y;
110 to->cx = (INT16)from->cx;
111 to->cy = (INT16)from->cy;
112 to->style = from->style;
113 to->lParam = from->lParam;
116 void STRUCT32_MDICREATESTRUCT16to32A( const MDICREATESTRUCT16* from,
117 MDICREATESTRUCTA *to )
119 to->hOwner = (HINSTANCE)from->hOwner;
120 to->x = (INT)from->x;
121 to->y = (INT)from->y;
122 to->cx = (INT)from->cx;
123 to->cy = (INT)from->cy;
124 to->style = from->style;
125 to->lParam = from->lParam;