Release 960309 Fri Mar 8 19:07:18 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [configure.in] Quote '[' and ']' in the test program for the strength-reduce bug. This should work much better... * [files/file.c] Augmented DOS_FILE structure. Most internal functions now return a DOS_FILE* instead of a Unix handle. Added a local file array to replace the PDB list upon startup, to allow using file I/O functions before the first task is created. Added FILE_SetDateTime() and FILE_Sync() functions. * [loader/module.c] Use the DOS file I/O functions in MODULE_LoadExeHeader(). * [objects/bitblt.c] Use visible region instead of GC clip region to clip source area. This fixes the card drawing bug in freecell. * [objects/region.c] Fixed CombineRgn() to allow src and dest regions to be the same. Fri Mar 8 16:32:23 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl> * [controls/EDIT.TODO] Updated so it reflects the current status. * [controls/edit.c] Implemented internal EDIT_WordBreakProc(). Implemented ES_READONLY. Implemented WM_LBUTTONDBLCLK to select whole words. Fixed a lot of types in the function definitions. Wed Mar 6 19:55:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [debugger/info.c] Added "walk window" command to walk window list. * [windows/mdi.c] Added proper(?) WM_MDISETMENU message handling. Wed Mar 6 09:27:12 1996 Martin von Loewis <loewis@informatik.hu-berlin.de> * [if1632/callback.c][if1632/relay32.c] RELAY32_CallWindowProcConvStruct: new function. * [win32/struct32.c][win32/Makefile.in][win32/param.c][win32/user32.c] struct32.c: new file. Moved all structure conversions into that file PARAM32_POINT32to16,MSG16to32,USER32_RECT32to16: renamed to STRUCT32_POINT32to16, ... WIN32_POINT,WIN32_MSG,WIN32_RECT,WIN32_PAINTSTRUCT: renamed to POINT32, ... New conversion functions for NCCALCSIZE_PARAMS, WINDOWPOS, CREATESTRUCT. * [include/windows.h][misc/exec.c] WINHELP, MULTIKEYHELP, HELPWININFO: new structures WinHelp: Reimplemented. Thanks to Peter Balch (100710.2566@compuserve.com) for his valuable research. * [win32/winprocs.c] WIN32_CallWindowProcTo16: new function, call in USER32_DefWindowProcA,... Mon Mar 4 23:22:40 1996 Jim Peterson <jspeter@birch.ee.vt.edu> * [include/wintypes.h] Added "#define __export". * [objects/bitblt.c] Put in a few hacks to make bitblt-ing work when upside-down and/or mirrored. BITBLT_StretchImage should really be checked over thoroughly. * [programs/progman/main.c] Added "#include <resource.h>" for definition of HAVE_WINE_CONSTRUCTOR. * [rc/parser.h] [rc/parser.l] [rc/parser.y] [rc/winerc.c] Eliminated shift/reduce conflict in style definition. Added crude error message support: "stdin:%d: parse error before '%s'". Implemented string table support to the best of my ability (it works with LoadString() calls). * [windows/nonclient.c] Fixed bug in NC_DoSizeMove() that made system menu pop up when title bar of non-iconized window was clicked (checked for iconization). Mon Mar 04 20:55:19 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [if1632/lzexpand.spec] [if1632/relay.c] [include/lzexpand.h][misc/lzexpand.c] LZEXPAND.DLL added. Sun Mar 03 18:10:22 1996 Albrecht Kleine <kleine@ak.sax.de> * [windows/win.c] Prevent usage of invalid HWNDs in WIN_EnumChildWin(), this prevents too early termination of EnumChildWindows().
diff --git a/win32/Makefile.in b/win32/Makefile.in index b7ea362..a5e8e38 100644 --- a/win32/Makefile.in +++ b/win32/Makefile.in
@@ -18,6 +18,7 @@ process.c \ resource.c \ string32.c \ + struct32.c \ thread.c \ time.c \ user32.c \
diff --git a/win32/param32.c b/win32/param32.c index 523c265..7d6f95a 100644 --- a/win32/param32.c +++ b/win32/param32.c
@@ -13,19 +13,6 @@ #include "stddebug.h" #include "debug.h" -void PARAM32_POINT32to16(const POINT32* p32,POINT* p16) -{ - p16->x = p32->x; - p16->y = p32->y; -} - -void PARAM32_SIZE16to32(const SIZE* p16, SIZE32* p32) - -{ - p32->cx = p16->cx; - p32->cy = p16->cy; -} - /**************************************************************** * MoveToEx (GDI32.254) */ @@ -35,7 +22,7 @@ if (p32 == NULL) return MoveToEx(hdc,x,y,(POINT *)NULL); else { - PARAM32_POINT32to16(p32,&p); + STRUCT32_POINT32to16(p32,&p); return MoveToEx(hdc,x,y,&p); } } @@ -47,7 +34,7 @@ BOOL retval; retval = GetTextExtentPoint(hdc, str, length, &s); - PARAM32_SIZE16to32(&s, lpsize); + STRUCT32_SIZE16to32(&s, lpsize); return retval; }
diff --git a/win32/struct32.c b/win32/struct32.c new file mode 100644 index 0000000..4a70c17 --- /dev/null +++ b/win32/struct32.c
@@ -0,0 +1,150 @@ +/* + * Win32 structure conversion functions + * + * Copyright 1996 Martin von Loewis + */ + +#include <stdio.h> +#include "windows.h" +#include "winerror.h" +#include "struct32.h" +#include "stddebug.h" +#include "debug.h" + +void STRUCT32_POINT32to16(const POINT32* p32,POINT* p16) +{ + p16->x = p32->x; + p16->y = p32->y; +} + +void STRUCT32_POINT16to32(const POINT* p16,POINT32* p32) +{ + p32->x = p16->x; + p32->y = p16->y; +} + +void STRUCT32_SIZE16to32(const SIZE* p16, SIZE32* p32) + +{ + p32->cx = p16->cx; + p32->cy = p16->cy; +} + +void STRUCT32_MSG16to32(MSG *msg16,MSG32 *msg32) +{ + msg32->hwnd=(DWORD)msg16->hwnd; + msg32->message=msg16->message; + msg32->wParam=msg16->wParam; + msg32->lParam=msg16->lParam; + msg32->time=msg16->time; + msg32->pt.x=msg16->pt.x; + msg32->pt.y=msg16->pt.y; +} + +void STRUCT32_MSG32to16(MSG32 *msg32,MSG *msg16) +{ + msg16->hwnd=(HWND)msg32->hwnd; + msg16->message=msg32->message; + msg16->wParam=msg32->wParam; + msg16->lParam=msg32->lParam; + msg16->time=msg32->time; + msg16->pt.x=msg32->pt.x; + msg16->pt.y=msg32->pt.y; +} + +void STRUCT32_RECT32to16(const RECT32* r32,RECT *r16) +{ + r16->left = r32->left; + r16->right = r32->right; + r16->top = r32->top; + r16->bottom = r32->bottom; +} + +void STRUCT32_RECT16to32(const RECT* r16,RECT32 *r32) +{ + r32->left = r16->left; + r32->right = r16->right; + r32->top = r16->top; + r32->bottom = r16->bottom; +} + +void STRUCT32_MINMAXINFO32to16(const MINMAXINFO32 *from,MINMAXINFO *to) +{ + STRUCT32_POINT32to16(&from->ptReserved,&to->ptReserved); + STRUCT32_POINT32to16(&from->ptMaxSize,&to->ptMaxSize); + STRUCT32_POINT32to16(&from->ptMaxPosition,&to->ptMaxPosition); + STRUCT32_POINT32to16(&from->ptMinTrackSize,&to->ptMinTrackSize); + STRUCT32_POINT32to16(&from->ptMaxTrackSize,&to->ptMaxTrackSize); +} + +void STRUCT32_MINMAXINFO16to32(const MINMAXINFO *from,MINMAXINFO32 *to) +{ + STRUCT32_POINT16to32(&from->ptReserved,&to->ptReserved); + STRUCT32_POINT16to32(&from->ptMaxSize,&to->ptMaxSize); + STRUCT32_POINT16to32(&from->ptMaxPosition,&to->ptMaxPosition); + STRUCT32_POINT16to32(&from->ptMinTrackSize,&to->ptMinTrackSize); + STRUCT32_POINT16to32(&from->ptMaxTrackSize,&to->ptMaxTrackSize); +} + +void STRUCT32_WINDOWPOS32to16(const WINDOWPOS32* from,WINDOWPOS* to) +{ + to->hwnd=from->hwnd; + to->hwndInsertAfter=from->hwndInsertAfter; + to->x=from->x; + to->y=from->y; + to->cx=from->cx; + to->flags=from->flags; +} + +void STRUCT32_WINDOWPOS16to32(const WINDOWPOS* from,WINDOWPOS32* to) +{ + to->hwnd=from->hwnd; + to->hwndInsertAfter=from->hwndInsertAfter; + to->x=from->x; + to->y=from->y; + to->cx=from->cx; + to->flags=from->flags; +} + +void STRUCT32_NCCALCSIZE32to16Flat(const NCCALCSIZE_PARAMS32* from, + NCCALCSIZE_PARAMS* to) +{ + STRUCT32_RECT32to16(from->rgrc,to->rgrc); + STRUCT32_RECT32to16(from->rgrc+1,to->rgrc+1); + STRUCT32_RECT32to16(from->rgrc+2,to->rgrc+2); +} + +void STRUCT32_NCCALCSIZE16to32Flat(const NCCALCSIZE_PARAMS* from, + NCCALCSIZE_PARAMS32* to) +{ + STRUCT32_RECT16to32(from->rgrc,to->rgrc); + STRUCT32_RECT16to32(from->rgrc+1,to->rgrc+1); + STRUCT32_RECT16to32(from->rgrc+2,to->rgrc+2); +} + +/* The strings are not copied */ +void STRUCT32_CREATESTRUCT32to16(const CREATESTRUCT32* from,CREATESTRUCT* to) +{ + to->lpCreateParams = (LPVOID)from->lpCreateParams; + to->hInstance = from->hInstance; + to->hMenu = from->hMenu; + to->hwndParent = from->hwndParent; + to->cy = from->cy; + to->cx = from->cx; + to->y = from->y; + to->style = from->style; + to->dwExStyle = from->dwExStyle; +} + +void STRUCT32_CREATESTRUCT16to32(const CREATESTRUCT* from,CREATESTRUCT32 *to) +{ + to->lpCreateParams = (DWORD)from->lpCreateParams; + to->hInstance = from->hInstance; + to->hMenu = from->hMenu; + to->hwndParent = from->hwndParent; + to->cy = from->cy; + to->cx = from->cx; + to->y = from->y; + to->style = from->style; + to->dwExStyle = from->dwExStyle; +}
diff --git a/win32/user32.c b/win32/user32.c index c195056..3c94151 100644 --- a/win32/user32.c +++ b/win32/user32.c
@@ -24,45 +24,6 @@ #include "debug.h" #include "stddebug.h" -/* Structure copy functions */ -static void MSG16to32(MSG *msg16,struct WIN32_MSG *msg32) -{ - msg32->hwnd=(DWORD)msg16->hwnd; - msg32->message=msg16->message; - msg32->wParam=msg16->wParam; - msg32->lParam=msg16->lParam; - msg32->time=msg16->time; - msg32->pt.x=msg16->pt.x; - msg32->pt.y=msg16->pt.y; -} - -static void MSG32to16(struct WIN32_MSG *msg32,MSG *msg16) -{ - msg16->hwnd=(HWND)msg32->hwnd; - msg16->message=msg32->message; - msg16->wParam=msg32->wParam; - msg16->lParam=msg32->lParam; - msg16->time=msg32->time; - msg16->pt.x=msg32->pt.x; - msg16->pt.y=msg32->pt.y; -} - -void USER32_RECT32to16(const RECT32* r32,RECT *r16) -{ - r16->left = r32->left; - r16->right = r32->right; - r16->top = r32->top; - r16->bottom = r32->bottom; -} - -void USER32_RECT16to32(const RECT* r16,RECT32 *r32) -{ - r32->left = r16->left; - r32->right = r16->right; - r32->top = r16->top; - r32->bottom = r16->bottom; -} - /*********************************************************************** * RegisterClassA (USER32.426) */ @@ -113,19 +74,19 @@ /*********************************************************************** * GetMessageA (USER32.269) */ -BOOL USER32_GetMessageA(struct WIN32_MSG* lpmsg,DWORD hwnd,DWORD min,DWORD max) +BOOL USER32_GetMessageA(MSG32* lpmsg,DWORD hwnd,DWORD min,DWORD max) { BOOL ret; MSG msg; ret=GetMessage(MAKE_SEGPTR(&msg),(HWND)hwnd,min,max); - MSG16to32(&msg,lpmsg); + STRUCT32_MSG16to32(&msg,lpmsg); return ret; } /*********************************************************************** * BeginPaint (USER32.9) */ -HDC USER32_BeginPaint(DWORD hwnd,struct WIN32_PAINTSTRUCT *lpps) +HDC USER32_BeginPaint(DWORD hwnd,PAINTSTRUCT32 *lpps) { PAINTSTRUCT ps; HDC ret; @@ -144,7 +105,7 @@ /*********************************************************************** * EndPaint (USER32.175) */ -BOOL USER32_EndPaint(DWORD hwnd,struct WIN32_PAINTSTRUCT *lpps) +BOOL USER32_EndPaint(DWORD hwnd,PAINTSTRUCT32 *lpps) { PAINTSTRUCT ps; ps.hdc=(HDC)lpps->hdc; @@ -162,23 +123,23 @@ /*********************************************************************** * DispatchMessageA (USER32.140) */ -LONG USER32_DispatchMessageA(struct WIN32_MSG* lpmsg) +LONG USER32_DispatchMessageA(MSG32* lpmsg) { MSG msg; LONG ret; - MSG32to16(lpmsg,&msg); + STRUCT32_MSG32to16(lpmsg,&msg); ret=DispatchMessage(&msg); - MSG16to32(&msg,lpmsg); + STRUCT32_MSG16to32(&msg,lpmsg); return ret; } /*********************************************************************** * TranslateMessage (USER32.555) */ -BOOL USER32_TranslateMessage(struct WIN32_MSG* lpmsg) +BOOL USER32_TranslateMessage(MSG32* lpmsg) { MSG msg; - MSG32to16(lpmsg,&msg); + STRUCT32_MSG32to16(lpmsg,&msg); return TranslateMessage(&msg); } @@ -256,7 +217,7 @@ if (lpRect == NULL) InvalidateRect(hWnd, (RECT *)NULL, bErase); else { - USER32_RECT32to16(lpRect,&r); + STRUCT32_RECT32to16(lpRect,&r); InvalidateRect(hWnd,&r,bErase); } /* FIXME: Return meaningful value */ @@ -269,7 +230,7 @@ int USER32_DrawTextA(HDC hdc,LPCSTR lpStr,int count,RECT32* r32,UINT uFormat) { RECT r; - USER32_RECT32to16(r32,&r); + STRUCT32_RECT32to16(r32,&r); return DrawText(hdc,lpStr,count,&r,uFormat); } @@ -280,7 +241,7 @@ { RECT r; GetClientRect(hwnd,&r); - USER32_RECT16to32(&r,r32); + STRUCT32_RECT16to32(&r,r32); /* FIXME: return value */ return 0; }
diff --git a/win32/winprocs.c b/win32/winprocs.c index 9b2d364..963451c 100644 --- a/win32/winprocs.c +++ b/win32/winprocs.c
@@ -13,6 +13,8 @@ #include "winerror.h" #include "kernel32.h" +#include "wintypes.h" +#include "struct32.h" #include "wincon.h" #include "stackframe.h" #include "stddebug.h" @@ -35,6 +37,70 @@ } } +BOOL WIN32_CallWindowProcTo16(LRESULT(*func)(HWND,UINT,WPARAM,LPARAM), + HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) +{ + WINDOWPOS wp; + union{ + MINMAXINFO mmi; + NCCALCSIZE_PARAMS nccs; + CREATESTRUCT cs; + } st; + WINDOWPOS32 *pwp; + CREATESTRUCT32 *pcs; + LONG result; + if(!lParam || !UsesLParamPtr(msg)) + return func(hwnd,msg,wParam,lParam); + switch(msg) + { + case WM_GETMINMAXINFO: + STRUCT32_MINMAXINFO32to16((void*)lParam,&st.mmi); + result=func(hwnd,msg,wParam,MAKE_SEGPTR(&st.mmi)); + STRUCT32_MINMAXINFO16to32(&st.mmi,(void*)lParam); + return result; + case WM_WINDOWPOSCHANGING: + case WM_WINDOWPOSCHANGED: + STRUCT32_WINDOWPOS32to16((void*)lParam,&wp); + result=func(hwnd,msg,wParam,MAKE_SEGPTR(&wp)); + STRUCT32_WINDOWPOS16to32(&wp,(void*)lParam); + return result; + case WM_NCCALCSIZE: + pwp=((NCCALCSIZE_PARAMS32*)lParam)->lppos; + STRUCT32_NCCALCSIZE32to16Flat((void*)lParam,&st.nccs); + if(pwp) { + STRUCT32_WINDOWPOS32to16(pwp,&wp); + st.nccs.lppos = ℘ + }else + st.nccs.lppos = 0; + result=func(hwnd,msg,wParam,MAKE_SEGPTR(&st.nccs)); + STRUCT32_NCCALCSIZE16to32Flat(&st.nccs,(void*)lParam); + if(pwp) + STRUCT32_WINDOWPOS16to32(&wp,pwp); + return result; + case WM_NCCREATE: + pcs = (CREATESTRUCT32*)lParam; + STRUCT32_CREATESTRUCT32to16((void*)lParam,&st.cs); + st.cs.lpszName = HIWORD(pcs->lpszName) ? + MAKE_SEGPTR(pcs->lpszName) : pcs->lpszName; + st.cs.lpszClass = HIWORD(pcs->lpszClass) ? + MAKE_SEGPTR(pcs->lpszClass) : pcs->lpszClass; + result=func(hwnd,msg,wParam,MAKE_SEGPTR(&st.cs)); + STRUCT32_CREATESTRUCT16to32(&st.cs,(void*)lParam); + pcs->lpszName = HIWORD(pcs->lpszName) ? + PTR_SEG_TO_LIN(st.cs.lpszName) : pcs->lpszName; + pcs->lpszClass = HIWORD(pcs-> lpszClass) ? + PTR_SEG_TO_LIN(st.cs.lpszClass) : pcs-> lpszClass; + return result; + case WM_GETTEXT: + case WM_SETTEXT: + return func(hwnd,msg,wParam,MAKE_SEGPTR((void*)lParam)); + default: + fprintf(stderr,"No support for 32-16 msg 0x%x\n",msg); + } + return func(hwnd,msg,wParam,MAKE_SEGPTR((void*)lParam)); +} + + extern LRESULT AboutDlgProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT ButtonWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT ColorDlgProc(HWND,UINT,WPARAM,LPARAM); @@ -53,211 +119,143 @@ extern LRESULT ScrollBarWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT StaticWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT SystemMessageBoxProc(HWND,UINT,WPARAM,LPARAM); +extern LRESULT ComboLBoxWndProc(HWND,UINT,WPARAM,LPARAM); LRESULT USER32_DefWindowProcA(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return DefWindowProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return DefWindowProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(DefWindowProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT ButtonWndProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return ButtonWndProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return ButtonWndProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(ButtonWndProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT StaticWndProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return StaticWndProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return StaticWndProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(StaticWndProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT ScrollBarWndProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return ScrollBarWndProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return ScrollBarWndProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(ScrollBarWndProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT ListBoxWndProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return ListBoxWndProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return ListBoxWndProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(ListBoxWndProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT ComboBoxWndProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return ComboBoxWndProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return ComboBoxWndProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(ComboBoxWndProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT EditWndProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return EditWndProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return EditWndProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(EditWndProc,(HWND)hwnd, msg, wParam,lParam); } LRESULT PopupMenuWndProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return PopupMenuWndProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return PopupMenuWndProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(PopupMenuWndProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT DesktopWndProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return DesktopWndProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return DesktopWndProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(DesktopWndProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT DefDlgProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return DefDlgProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return DefDlgProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(DefDlgProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT MDIClientWndProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return MDIClientWndProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return MDIClientWndProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(MDIClientWndProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT DefWindowProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return DefWindowProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return DefWindowProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(DefWindowProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT DefMDIChildProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return DefMDIChildProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return DefMDIChildProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(DefMDIChildProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT SystemMessageBoxProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return SystemMessageBoxProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return SystemMessageBoxProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(SystemMessageBoxProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT FileOpenDlgProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return FileOpenDlgProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return FileOpenDlgProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(FileOpenDlgProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT FileSaveDlgProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return FileSaveDlgProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return FileSaveDlgProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(FileSaveDlgProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT ColorDlgProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return ColorDlgProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return ColorDlgProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(ColorDlgProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT FindTextDlgProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return FindTextDlgProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return FindTextDlgProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(FindTextDlgProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT ReplaceTextDlgProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return ReplaceTextDlgProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return ReplaceTextDlgProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(ReplaceTextDlgProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT PrintSetupDlgProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return PrintSetupDlgProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return PrintSetupDlgProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(PrintSetupDlgProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT PrintDlgProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return PrintDlgProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return PrintDlgProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(PrintDlgProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT AboutDlgProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return AboutDlgProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return AboutDlgProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(AboutDlgProc,(HWND)hwnd, msg, wParam, lParam); } LRESULT ComboLBoxWndProc32(DWORD hwnd, DWORD msg, DWORD wParam, DWORD lParam) { - if (UsesLParamPtr(msg)) - return ComboLBoxWndProc((HWND)hwnd, msg, wParam, MAKE_SEGPTR((void *)lParam)); - else - return ComboLBoxWndProc((HWND)hwnd, msg, wParam, lParam); + return WIN32_CallWindowProcTo16(ComboLBoxWndProc,(HWND)hwnd, msg, wParam, lParam); } #endif