2 * Copyright 1995 Martin von Loewis
20 #include "stackframe.h"
26 LONG
RELAY32_CallWindowProcConvStruct( WNDPROC func
, int hwnd
, int message
,
27 int wParam
, LPARAM lParam16
)
32 NCCALCSIZE_PARAMS32 nccs
;
39 return CallWndProc32(func
,hwnd
,message
,wParam
,(int)lParam16
);
40 lParam
= PTR_SEG_TO_LIN(lParam16
);
42 case WM_GETMINMAXINFO
:
43 STRUCT32_MINMAXINFO16to32(lParam
,&st
.mmi
);
44 result
=CallWndProc32(func
,hwnd
,message
,wParam
,(int)&st
.mmi
);
45 STRUCT32_MINMAXINFO32to16(&st
.mmi
,lParam
);
47 case WM_WINDOWPOSCHANGING
:
48 case WM_WINDOWPOSCHANGED
:
49 STRUCT32_WINDOWPOS16to32(lParam
,&wp
);
50 result
=CallWndProc32(func
,hwnd
,message
,wParam
,(int)&wp
);
51 STRUCT32_WINDOWPOS32to16(&wp
,lParam
);
54 STRUCT32_NCCALCSIZE16to32Flat(lParam
,&st
.nccs
);
55 if(((NCCALCSIZE_PARAMS
*)lParam
)->lppos
) {
56 STRUCT32_WINDOWPOS16to32(((NCCALCSIZE_PARAMS
*)lParam
)->lppos
,&wp
);
60 result
=CallWndProc32(func
,hwnd
,message
,wParam
,(int)&st
.nccs
);
61 STRUCT32_NCCALCSIZE32to16Flat(&st
.nccs
,lParam
);
62 if(((NCCALCSIZE_PARAMS
*)lParam
)->lppos
)
63 STRUCT32_WINDOWPOS32to16(&wp
,((NCCALCSIZE_PARAMS
*)lParam
)->lppos
);
66 lpcs
= (CREATESTRUCT
*)lParam
;
67 STRUCT32_CREATESTRUCT16to32(lParam
,&st
.cs
);
68 st
.cs
.lpszName
= HIWORD(lpcs
->lpszName
) ?
69 PTR_SEG_TO_LIN(lpcs
->lpszName
) : (char*)lpcs
->lpszName
;
70 st
.cs
.lpszClass
= HIWORD(lpcs
->lpszClass
) ?
71 PTR_SEG_TO_LIN(lpcs
->lpszClass
) : (char*)lpcs
->lpszClass
;
72 result
=CallWndProc32(func
,hwnd
,message
,wParam
,(int)&st
.cs
);
73 STRUCT32_CREATESTRUCT32to16(&st
.cs
,lParam
);
74 lpcs
->lpszName
= HIWORD(st
.cs
.lpszName
) ?
75 MAKE_SEGPTR(st
.cs
.lpszName
) : (SEGPTR
)st
.cs
.lpszName
;
76 lpcs
->lpszClass
= HIWORD(st
.cs
.lpszClass
) ?
77 MAKE_SEGPTR(st
.cs
.lpszClass
) : (SEGPTR
)st
.cs
.lpszClass
;
81 return CallWndProc32(func
,hwnd
,message
,wParam
,(int)lParam
);
83 fprintf(stderr
,"No conversion function for message %d\n",message
);
85 return CallWndProc32(func
,hwnd
,message
,wParam
,(int)lParam
);