Commit 892a2832 authored by Steven Edwards's avatar Steven Edwards Committed by Alexandre Julliard

Split up the Win16/32 MDI support a bit.

parent 2de64d4b
......@@ -1270,6 +1270,100 @@ HWND16 WINAPI FindWindowEx16( HWND16 parent, HWND16 child, LPCSTR className, LPC
}
/***********************************************************************
* DefFrameProc (USER.445)
*/
LRESULT WINAPI DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient,
UINT16 message, WPARAM16 wParam, LPARAM lParam )
{
switch (message)
{
case WM_SETTEXT:
lParam = (LPARAM)MapSL(lParam);
/* fall through */
case WM_COMMAND:
case WM_NCACTIVATE:
case WM_SETFOCUS:
case WM_SIZE:
return DefFrameProcA( WIN_Handle32(hwnd), WIN_Handle32(hwndMDIClient),
message, wParam, lParam );
case WM_NEXTMENU:
{
MDINEXTMENU next_menu;
DefFrameProcW( WIN_Handle32(hwnd), WIN_Handle32(hwndMDIClient),
message, wParam, (LPARAM)&next_menu );
return MAKELONG( HMENU_16(next_menu.hmenuNext), HWND_16(next_menu.hwndNext) );
}
default:
return DefWindowProc16(hwnd, message, wParam, lParam);
}
}
/***********************************************************************
* DefMDIChildProc (USER.447)
*/
LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
WPARAM16 wParam, LPARAM lParam )
{
switch (message)
{
case WM_SETTEXT:
return DefMDIChildProcA( WIN_Handle32(hwnd), message, wParam, (LPARAM)MapSL(lParam) );
case WM_MENUCHAR:
case WM_CLOSE:
case WM_SETFOCUS:
case WM_CHILDACTIVATE:
case WM_SYSCOMMAND:
case WM_SETVISIBLE:
case WM_SIZE:
case WM_SYSCHAR:
return DefMDIChildProcW( WIN_Handle32(hwnd), message, wParam, lParam );
case WM_GETMINMAXINFO:
{
MINMAXINFO16 *mmi16 = (MINMAXINFO16 *)MapSL(lParam);
MINMAXINFO mmi;
mmi.ptReserved.x = mmi16->ptReserved.x;
mmi.ptReserved.y = mmi16->ptReserved.y;
mmi.ptMaxSize.x = mmi16->ptMaxSize.x;
mmi.ptMaxSize.y = mmi16->ptMaxSize.y;
mmi.ptMaxPosition.x = mmi16->ptMaxPosition.x;
mmi.ptMaxPosition.y = mmi16->ptMaxPosition.y;
mmi.ptMinTrackSize.x = mmi16->ptMinTrackSize.x;
mmi.ptMinTrackSize.y = mmi16->ptMinTrackSize.y;
mmi.ptMaxTrackSize.x = mmi16->ptMaxTrackSize.x;
mmi.ptMaxTrackSize.y = mmi16->ptMaxTrackSize.y;
DefMDIChildProcW( WIN_Handle32(hwnd), message, wParam, (LPARAM)&mmi );
mmi16->ptReserved.x = mmi.ptReserved.x;
mmi16->ptReserved.y = mmi.ptReserved.y;
mmi16->ptMaxSize.x = mmi.ptMaxSize.x;
mmi16->ptMaxSize.y = mmi.ptMaxSize.y;
mmi16->ptMaxPosition.x = mmi.ptMaxPosition.x;
mmi16->ptMaxPosition.y = mmi.ptMaxPosition.y;
mmi16->ptMinTrackSize.x = mmi.ptMinTrackSize.x;
mmi16->ptMinTrackSize.y = mmi.ptMinTrackSize.y;
mmi16->ptMaxTrackSize.x = mmi.ptMaxTrackSize.x;
mmi16->ptMaxTrackSize.y = mmi.ptMaxTrackSize.y;
return 0;
}
case WM_NEXTMENU:
{
MDINEXTMENU next_menu;
DefMDIChildProcW( WIN_Handle32(hwnd), message, wParam, (LPARAM)&next_menu );
return MAKELONG( HMENU_16(next_menu.hmenuNext), HWND_16(next_menu.hwndNext) );
}
default:
return DefWindowProc16(hwnd, message, wParam, lParam);
}
}
/**************************************************************************
* DrawAnimatedRects (USER.448)
*/
......
......@@ -1433,37 +1433,6 @@ static LRESULT WINAPI MDIClientWndProcW( HWND hwnd, UINT message, WPARAM wParam,
}
/***********************************************************************
* DefFrameProc (USER.445)
*/
LRESULT WINAPI DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient,
UINT16 message, WPARAM16 wParam, LPARAM lParam )
{
switch (message)
{
case WM_SETTEXT:
lParam = (LPARAM)MapSL(lParam);
/* fall through */
case WM_COMMAND:
case WM_NCACTIVATE:
case WM_SETFOCUS:
case WM_SIZE:
return DefFrameProcA( WIN_Handle32(hwnd), WIN_Handle32(hwndMDIClient),
message, wParam, lParam );
case WM_NEXTMENU:
{
MDINEXTMENU next_menu;
DefFrameProcW( WIN_Handle32(hwnd), WIN_Handle32(hwndMDIClient),
message, wParam, (LPARAM)&next_menu );
return MAKELONG( HMENU_16(next_menu.hmenuNext), HWND_16(next_menu.hwndNext) );
}
default:
return DefWindowProc16(hwnd, message, wParam, lParam);
}
}
/***********************************************************************
* DefFrameProcA (USER32.@)
*/
LRESULT WINAPI DefFrameProcA( HWND hwnd, HWND hwndMDIClient,
......@@ -1589,47 +1558,6 @@ LRESULT WINAPI DefFrameProcW( HWND hwnd, HWND hwndMDIClient,
return DefWindowProcW( hwnd, message, wParam, lParam );
}
/***********************************************************************
* DefMDIChildProc (USER.447)
*/
LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
WPARAM16 wParam, LPARAM lParam )
{
switch (message)
{
case WM_SETTEXT:
return DefMDIChildProcA( WIN_Handle32(hwnd), message, wParam, (LPARAM)MapSL(lParam) );
case WM_MENUCHAR:
case WM_CLOSE:
case WM_SETFOCUS:
case WM_CHILDACTIVATE:
case WM_SYSCOMMAND:
case WM_SETVISIBLE:
case WM_SIZE:
case WM_SYSCHAR:
return DefMDIChildProcW( WIN_Handle32(hwnd), message, wParam, lParam );
case WM_GETMINMAXINFO:
{
MINMAXINFO16 *mmi16 = (MINMAXINFO16 *)MapSL(lParam);
MINMAXINFO mmi;
STRUCT32_MINMAXINFO16to32( mmi16, &mmi );
DefMDIChildProcW( WIN_Handle32(hwnd), message, wParam, (LPARAM)&mmi );
STRUCT32_MINMAXINFO32to16( &mmi, mmi16 );
return 0;
}
case WM_NEXTMENU:
{
MDINEXTMENU next_menu;
DefMDIChildProcW( WIN_Handle32(hwnd), message, wParam, (LPARAM)&next_menu );
return MAKELONG( HMENU_16(next_menu.hmenuNext), HWND_16(next_menu.hwndNext) );
}
default:
return DefWindowProc16(hwnd, message, wParam, lParam);
}
}
/***********************************************************************
* DefMDIChildProcA (USER32.@)
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment