2 * Win32 structure conversion functions
4 * Copyright 1996 Martin von Loewis
11 void STRUCT32_MSG16to32(const MSG16
*msg16
,MSG
*msg32
)
13 msg32
->hwnd
= WIN_Handle32(msg16
->hwnd
);
14 msg32
->message
=msg16
->message
;
15 msg32
->wParam
=msg16
->wParam
;
16 msg32
->lParam
=msg16
->lParam
;
17 msg32
->time
=msg16
->time
;
18 msg32
->pt
.x
=msg16
->pt
.x
;
19 msg32
->pt
.y
=msg16
->pt
.y
;
22 void STRUCT32_MSG32to16(const MSG
*msg32
,MSG16
*msg16
)
24 msg16
->hwnd
= WIN_Handle16(msg32
->hwnd
);
25 msg16
->message
=msg32
->message
;
26 msg16
->wParam
=msg32
->wParam
;
27 msg16
->lParam
=msg32
->lParam
;
28 msg16
->time
=msg32
->time
;
29 msg16
->pt
.x
=msg32
->pt
.x
;
30 msg16
->pt
.y
=msg32
->pt
.y
;
33 void STRUCT32_MINMAXINFO32to16( const MINMAXINFO
*from
, MINMAXINFO16
*to
)
35 CONV_POINT32TO16( &from
->ptReserved
, &to
->ptReserved
);
36 CONV_POINT32TO16( &from
->ptMaxSize
, &to
->ptMaxSize
);
37 CONV_POINT32TO16( &from
->ptMaxPosition
, &to
->ptMaxPosition
);
38 CONV_POINT32TO16( &from
->ptMinTrackSize
, &to
->ptMinTrackSize
);
39 CONV_POINT32TO16( &from
->ptMaxTrackSize
, &to
->ptMaxTrackSize
);
42 void STRUCT32_MINMAXINFO16to32( const MINMAXINFO16
*from
, MINMAXINFO
*to
)
44 CONV_POINT16TO32( &from
->ptReserved
, &to
->ptReserved
);
45 CONV_POINT16TO32( &from
->ptMaxSize
, &to
->ptMaxSize
);
46 CONV_POINT16TO32( &from
->ptMaxPosition
, &to
->ptMaxPosition
);
47 CONV_POINT16TO32( &from
->ptMinTrackSize
, &to
->ptMinTrackSize
);
48 CONV_POINT16TO32( &from
->ptMaxTrackSize
, &to
->ptMaxTrackSize
);
51 void STRUCT32_WINDOWPOS32to16( const WINDOWPOS
* from
, WINDOWPOS16
* to
)
53 to
->hwnd
= WIN_Handle16(from
->hwnd
);
54 to
->hwndInsertAfter
= WIN_Handle16(from
->hwndInsertAfter
);
59 to
->flags
= from
->flags
;
62 void STRUCT32_WINDOWPOS16to32( const WINDOWPOS16
* from
, WINDOWPOS
* to
)
64 to
->hwnd
= WIN_Handle32(from
->hwnd
);
65 to
->hwndInsertAfter
= (from
->hwndInsertAfter
== (HWND16
)-1) ?
66 HWND_TOPMOST
: WIN_Handle32(from
->hwndInsertAfter
);
71 to
->flags
= from
->flags
;
74 /* The strings are not copied */
75 void STRUCT32_CREATESTRUCT32Ato16( const CREATESTRUCTA
* from
,
78 to
->lpCreateParams
= from
->lpCreateParams
;
79 to
->hInstance
= (HINSTANCE16
)from
->hInstance
;
80 to
->hMenu
= (HMENU16
)from
->hMenu
;
81 to
->hwndParent
= WIN_Handle16(from
->hwndParent
);
86 to
->style
= from
->style
;
87 to
->dwExStyle
= from
->dwExStyle
;
90 void STRUCT32_CREATESTRUCT16to32A( const CREATESTRUCT16
* from
,
93 to
->lpCreateParams
= from
->lpCreateParams
;
94 to
->hInstance
= (HINSTANCE
)from
->hInstance
;
95 to
->hMenu
= (HMENU
)from
->hMenu
;
96 to
->hwndParent
= WIN_Handle32(from
->hwndParent
);
101 to
->style
= from
->style
;
102 to
->dwExStyle
= from
->dwExStyle
;
105 /* The strings are not copied */
106 void STRUCT32_MDICREATESTRUCT32Ato16( const MDICREATESTRUCTA
* from
,
107 MDICREATESTRUCT16
* to
)
109 to
->hOwner
= (HINSTANCE16
)from
->hOwner
;
114 to
->style
= from
->style
;
115 to
->lParam
= from
->lParam
;
118 void STRUCT32_MDICREATESTRUCT16to32A( const MDICREATESTRUCT16
* from
,
119 MDICREATESTRUCTA
*to
)
121 to
->hOwner
= (HINSTANCE
)from
->hOwner
;
126 to
->style
= from
->style
;
127 to
->lParam
= from
->lParam
;