Made all 16<->32 HWND conversions use explicit functions instead of
implicit type casts. Moved a lot of 16-bit functions to the new wnd16.c file. Changed DIALOGINFO structure handling to support 32-bit handles.
This commit is contained in:
parent
629aab1768
commit
d23a82bc86
|
@ -218,7 +218,8 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
|||
btn_type == BS_OWNERDRAW)
|
||||
{
|
||||
SendMessageW( GetParent(hWnd), WM_COMMAND,
|
||||
MAKEWPARAM( GetWindowLongA(hWnd,GWL_ID), BN_DOUBLECLICKED ), hWnd);
|
||||
MAKEWPARAM( GetWindowLongA(hWnd,GWL_ID), BN_DOUBLECLICKED ),
|
||||
(LPARAM)hWnd);
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
|
@ -263,7 +264,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
|||
break;
|
||||
}
|
||||
SendMessageW( GetParent(hWnd), WM_COMMAND,
|
||||
MAKEWPARAM( GetWindowLongA(hWnd,GWL_ID), BN_CLICKED ), hWnd);
|
||||
MAKEWPARAM( GetWindowLongA(hWnd,GWL_ID), BN_CLICKED ), (LPARAM)hWnd);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -308,7 +309,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
|||
if (btn_type == BS_AUTORADIOBUTTON)
|
||||
SendMessageW( hWnd, BM_SETCHECK, BUTTON_CHECKED, 0 );
|
||||
SendMessageW( GetParent(hWnd), WM_COMMAND,
|
||||
MAKEWPARAM( GetWindowLongA(hWnd,GWL_ID), BN_CLICKED ), hWnd);
|
||||
MAKEWPARAM( GetWindowLongA(hWnd,GWL_ID), BN_CLICKED ), (LPARAM)hWnd);
|
||||
}
|
||||
set_button_state( hWnd, get_button_state(hWnd) | BUTTON_HASFOCUS );
|
||||
paint_button( hWnd, btn_type, ODA_FOCUS );
|
||||
|
@ -677,7 +678,7 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
|
|||
|
||||
/* Send WM_CTLCOLOR to allow changing the font (the colors are fixed) */
|
||||
if ((hFont = get_button_font( hwnd ))) SelectObject( hDC, hFont );
|
||||
SendMessageW( GetParent(hwnd), WM_CTLCOLORBTN, hDC, hwnd );
|
||||
SendMessageW( GetParent(hwnd), WM_CTLCOLORBTN, hDC, (LPARAM)hwnd );
|
||||
hOldPen = (HPEN)SelectObject(hDC, GetSysColorPen(COLOR_WINDOWFRAME));
|
||||
hOldBrush =(HBRUSH)SelectObject(hDC,GetSysColorBrush(COLOR_BTNFACE));
|
||||
oldBkMode = SetBkMode(hDC, TRANSPARENT);
|
||||
|
@ -802,10 +803,9 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
|
|||
|
||||
if ((hFont = get_button_font( hwnd ))) SelectObject( hDC, hFont );
|
||||
|
||||
/* GetControlBrush16 sends WM_CTLCOLORBTN, plus it returns default brush
|
||||
* if parent didn't return valid one. So we kill two hares at once
|
||||
*/
|
||||
hBrush = GetControlBrush16( hwnd, hDC, CTLCOLOR_BTN );
|
||||
hBrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORBTN, hDC, (LPARAM)hwnd );
|
||||
if (!hBrush) /* did the app forget to call defwindowproc ? */
|
||||
hBrush = DefWindowProcW( GetParent(hwnd), WM_CTLCOLORBTN, hDC, (LPARAM)hwnd );
|
||||
|
||||
if (style & BS_LEFTTEXT)
|
||||
{
|
||||
|
@ -951,7 +951,9 @@ static void GB_Paint( HWND hwnd, HDC hDC, UINT action )
|
|||
|
||||
if ((hFont = get_button_font( hwnd ))) SelectObject( hDC, hFont );
|
||||
/* GroupBox acts like static control, so it sends CTLCOLORSTATIC */
|
||||
hbr = GetControlBrush16( hwnd, hDC, CTLCOLOR_STATIC );
|
||||
hbr = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hDC, (LPARAM)hwnd );
|
||||
if (!hbr) /* did the app forget to call defwindowproc ? */
|
||||
hbr = DefWindowProcW( GetParent(hwnd), WM_CTLCOLORSTATIC, hDC, (LPARAM)hwnd );
|
||||
|
||||
GetClientRect( hwnd, &rc);
|
||||
if (TWEAK_WineLook == WIN31_LOOK) {
|
||||
|
@ -1008,7 +1010,10 @@ static void UB_Paint( HWND hwnd, HDC hDC, UINT action )
|
|||
GetClientRect( hwnd, &rc);
|
||||
|
||||
if ((hFont = get_button_font( hwnd ))) SelectObject( hDC, hFont );
|
||||
hBrush = GetControlBrush16( hwnd, hDC, CTLCOLOR_BTN );
|
||||
|
||||
hBrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORBTN, hDC, (LPARAM)hwnd );
|
||||
if (!hBrush) /* did the app forget to call defwindowproc ? */
|
||||
hBrush = DefWindowProcW( GetParent(hwnd), WM_CTLCOLORBTN, hDC, (LPARAM)hwnd );
|
||||
|
||||
FillRect( hDC, &rc, hBrush );
|
||||
if ((action == ODA_FOCUS) ||
|
||||
|
|
|
@ -31,8 +31,8 @@ DEFAULT_DEBUG_CHANNEL(combo);
|
|||
*/
|
||||
|
||||
#define CB_NOTIFY( lphc, code ) \
|
||||
(SendMessageW((lphc)->owner, WM_COMMAND, \
|
||||
MAKEWPARAM(GetWindowLongA((lphc)->self,GWL_ID), (code)), (lphc)->self))
|
||||
(SendMessageW((lphc)->owner, WM_COMMAND, \
|
||||
MAKEWPARAM(GetWindowLongA((lphc)->self,GWL_ID), (code)), (LPARAM)(lphc)->self))
|
||||
|
||||
#define CB_DISABLED( lphc ) (!IsWindowEnabled((lphc)->self))
|
||||
#define CB_OWNERDRAWN( lphc ) ((lphc)->dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))
|
||||
|
@ -626,7 +626,7 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
|
|||
}
|
||||
|
||||
TRACE("init done\n");
|
||||
return hwnd;
|
||||
return 0;
|
||||
}
|
||||
ERR("edit control failure.\n");
|
||||
} else ERR("listbox failure.\n");
|
||||
|
@ -898,7 +898,7 @@ static HBRUSH COMBO_PrepareColors(
|
|||
*/
|
||||
if (CB_DISABLED(lphc))
|
||||
{
|
||||
hBkgBrush = SendMessageW(lphc->owner, WM_CTLCOLORSTATIC, hDC, lphc->self );
|
||||
hBkgBrush = SendMessageW(lphc->owner, WM_CTLCOLORSTATIC, hDC, (LPARAM)lphc->self );
|
||||
|
||||
/*
|
||||
* We have to change the text color since WM_CTLCOLORSTATIC will
|
||||
|
@ -911,11 +911,11 @@ static HBRUSH COMBO_PrepareColors(
|
|||
{
|
||||
if (lphc->wState & CBF_EDIT)
|
||||
{
|
||||
hBkgBrush = SendMessageW(lphc->owner, WM_CTLCOLOREDIT, hDC, lphc->self );
|
||||
hBkgBrush = SendMessageW(lphc->owner, WM_CTLCOLOREDIT, hDC, (LPARAM)lphc->self );
|
||||
}
|
||||
else
|
||||
{
|
||||
hBkgBrush = SendMessageW(lphc->owner, WM_CTLCOLORLISTBOX, hDC, lphc->self );
|
||||
hBkgBrush = SendMessageW(lphc->owner, WM_CTLCOLORLISTBOX, hDC, (LPARAM)lphc->self );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,6 +123,7 @@ static BOOL ICONTITLE_SetTitlePos( HWND hwnd, HWND owner )
|
|||
*/
|
||||
static BOOL ICONTITLE_Paint( HWND hwnd, HWND owner, HDC hDC, BOOL bActive )
|
||||
{
|
||||
RECT rect;
|
||||
HFONT hPrevFont;
|
||||
HBRUSH hBrush = 0;
|
||||
COLORREF textColor = 0;
|
||||
|
@ -158,18 +159,16 @@ static BOOL ICONTITLE_Paint( HWND hwnd, HWND owner, HDC hDC, BOOL bActive )
|
|||
}
|
||||
}
|
||||
|
||||
FillWindow16( GetParent(hwnd), hwnd, hDC, hBrush );
|
||||
GetClientRect( hwnd, &rect );
|
||||
DPtoLP( hDC, (LPPOINT)&rect, 2 );
|
||||
FillRect( hDC, &rect, hBrush );
|
||||
|
||||
hPrevFont = SelectObject( hDC, hIconTitleFont );
|
||||
if( hPrevFont )
|
||||
{
|
||||
RECT rect;
|
||||
INT length;
|
||||
WCHAR buffer[80];
|
||||
|
||||
GetClientRect( hwnd, &rect );
|
||||
|
||||
length = GetWindowTextW( owner, buffer, 80 );
|
||||
INT length = GetWindowTextW( owner, buffer, sizeof(buffer) );
|
||||
SetTextColor( hDC, textColor );
|
||||
SetBkMode( hDC, TRANSPARENT );
|
||||
|
||||
|
@ -178,7 +177,7 @@ static BOOL ICONTITLE_Paint( HWND hwnd, HWND owner, HDC hDC, BOOL bActive )
|
|||
|
||||
SelectObject( hDC, hPrevFont );
|
||||
}
|
||||
return ( hPrevFont ) ? TRUE : FALSE;
|
||||
return (hPrevFont != 0);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -187,12 +186,9 @@ static BOOL ICONTITLE_Paint( HWND hwnd, HWND owner, HDC hDC, BOOL bActive )
|
|||
LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
LRESULT retvalue;
|
||||
HWND owner = GetWindow( hWnd, GW_OWNER );
|
||||
WND *wnd = WIN_FindWndPtr( hWnd );
|
||||
|
||||
if( !wnd )
|
||||
return 0;
|
||||
if (!IsWindow(hWnd)) return 0;
|
||||
|
||||
switch( msg )
|
||||
{
|
||||
|
@ -204,44 +200,30 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
|
|||
SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0, &bMultiLineTitle, 0 );
|
||||
hIconTitleFont = CreateFontIndirectA( &logFont );
|
||||
}
|
||||
retvalue = (hIconTitleFont) ? 0 : -1;
|
||||
goto END;
|
||||
return (hIconTitleFont ? 0 : -1);
|
||||
case WM_NCHITTEST:
|
||||
retvalue = HTCAPTION;
|
||||
goto END;
|
||||
return HTCAPTION;
|
||||
case WM_NCMOUSEMOVE:
|
||||
case WM_NCLBUTTONDBLCLK:
|
||||
retvalue = SendMessageW( owner, msg, wParam, lParam );
|
||||
goto END;
|
||||
return SendMessageW( owner, msg, wParam, lParam );
|
||||
case WM_ACTIVATE:
|
||||
if( wParam ) SetActiveWindow( owner );
|
||||
/* fall through */
|
||||
|
||||
return 0;
|
||||
case WM_CLOSE:
|
||||
retvalue = 0;
|
||||
goto END;
|
||||
return 0;
|
||||
case WM_SHOWWINDOW:
|
||||
if( wnd && wParam ) ICONTITLE_SetTitlePos( hWnd, owner );
|
||||
retvalue = 0;
|
||||
goto END;
|
||||
if (wParam) ICONTITLE_SetTitlePos( hWnd, owner );
|
||||
return 0;
|
||||
case WM_ERASEBKGND:
|
||||
if( wnd )
|
||||
{
|
||||
if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
|
||||
lParam = SendMessageA( owner, WM_ISACTIVEICON, 0, 0 );
|
||||
else
|
||||
lParam = (owner == GetActiveWindow());
|
||||
if( ICONTITLE_Paint( hWnd, owner, (HDC)wParam, (BOOL)lParam ) )
|
||||
ValidateRect( hWnd, NULL );
|
||||
retvalue = 1;
|
||||
goto END;
|
||||
}
|
||||
if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
|
||||
lParam = SendMessageA( owner, WM_ISACTIVEICON, 0, 0 );
|
||||
else
|
||||
lParam = (owner == GetActiveWindow());
|
||||
if( ICONTITLE_Paint( hWnd, owner, (HDC)wParam, (BOOL)lParam ) )
|
||||
ValidateRect( hWnd, NULL );
|
||||
return 1;
|
||||
}
|
||||
|
||||
retvalue = DefWindowProcW( hWnd, msg, wParam, lParam );
|
||||
END:
|
||||
WIN_ReleaseWndPtr(wnd);
|
||||
return retvalue;
|
||||
return DefWindowProcW( hWnd, msg, wParam, lParam );
|
||||
}
|
||||
|
||||
|
||||
|
|
128
controls/menu.c
128
controls/menu.c
|
@ -1068,7 +1068,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
|||
if (lpitem->fState & MF_GRAYED) dis.itemState |= ODS_GRAYED;
|
||||
if (lpitem->fState & MF_HILITE) dis.itemState |= ODS_SELECTED;
|
||||
dis.itemAction = odaction; /* ODA_DRAWENTIRE | ODA_SELECT | ODA_FOCUS; */
|
||||
dis.hwndItem = hmenu;
|
||||
dis.hwndItem = (HWND)hmenu;
|
||||
dis.hDC = hdc;
|
||||
dis.rcItem = lpitem->rect;
|
||||
TRACE("Ownerdraw: owner=%04x itemID=%d, itemState=%d, itemAction=%d, "
|
||||
|
@ -2901,7 +2901,7 @@ static BOOL MENU_InitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags)
|
|||
if (!(wFlags & TPM_NONOTIFY))
|
||||
SendMessageA( hWnd, WM_ENTERMENULOOP, bPopup, 0 );
|
||||
|
||||
SendMessageA( hWnd, WM_SETCURSOR, hWnd, HTCAPTION );
|
||||
SendMessageA( hWnd, WM_SETCURSOR, (WPARAM)hWnd, HTCAPTION );
|
||||
|
||||
if (!(wFlags & TPM_NONOTIFY))
|
||||
{
|
||||
|
@ -3006,20 +3006,6 @@ void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, INT vkey)
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* TrackPopupMenu (USER.416)
|
||||
*/
|
||||
BOOL16 WINAPI TrackPopupMenu16( HMENU16 hMenu, UINT16 wFlags, INT16 x, INT16 y,
|
||||
INT16 nReserved, HWND16 hWnd, const RECT16 *lpRect )
|
||||
{
|
||||
RECT r;
|
||||
if (lpRect)
|
||||
CONV_RECT16TO32( lpRect, &r );
|
||||
return TrackPopupMenu( hMenu, wFlags, x, y, nReserved, hWnd,
|
||||
lpRect ? &r : NULL );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* TrackPopupMenu (USER32.@)
|
||||
*
|
||||
|
@ -3349,16 +3335,6 @@ INT WINAPI GetMenuStringW( HMENU hMenu, UINT wItemID,
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* HiliteMenuItem (USER.162)
|
||||
*/
|
||||
BOOL16 WINAPI HiliteMenuItem16( HWND16 hWnd, HMENU16 hMenu, UINT16 wItemID,
|
||||
UINT16 wHilite )
|
||||
{
|
||||
return HiliteMenuItem( hWnd, hMenu, wItemID, wHilite );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* HiliteMenuItem (USER32.@)
|
||||
*/
|
||||
|
@ -3835,15 +3811,6 @@ BOOL WINAPI DestroyMenu( HMENU hMenu )
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetSystemMenu (USER.156)
|
||||
*/
|
||||
HMENU16 WINAPI GetSystemMenu16( HWND16 hWnd, BOOL16 bRevert )
|
||||
{
|
||||
return GetSystemMenu( hWnd, bRevert );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetSystemMenu (USER32.@)
|
||||
*/
|
||||
|
@ -3898,15 +3865,6 @@ HMENU WINAPI GetSystemMenu( HWND hWnd, BOOL bRevert )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetSystemMenu (USER.280)
|
||||
*/
|
||||
BOOL16 WINAPI SetSystemMenu16( HWND16 hwnd, HMENU16 hMenu )
|
||||
{
|
||||
return SetSystemMenu( hwnd, hMenu );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetSystemMenu (USER32.@)
|
||||
*/
|
||||
|
@ -3925,15 +3883,6 @@ BOOL WINAPI SetSystemMenu( HWND hwnd, HMENU hMenu )
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetMenu (USER.157)
|
||||
*/
|
||||
HMENU16 WINAPI GetMenu16( HWND16 hWnd )
|
||||
{
|
||||
return (HMENU16)GetMenu(hWnd);
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetMenu (USER32.@)
|
||||
*/
|
||||
|
@ -3945,15 +3894,6 @@ HMENU WINAPI GetMenu( HWND hWnd )
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* SetMenu (USER.158)
|
||||
*/
|
||||
BOOL16 WINAPI SetMenu16( HWND16 hWnd, HMENU16 hMenu )
|
||||
{
|
||||
return SetMenu( hWnd, hMenu );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* SetMenu (USER32.@)
|
||||
*/
|
||||
|
@ -4012,15 +3952,6 @@ HMENU WINAPI GetSubMenu( HMENU hMenu, INT nPos )
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DrawMenuBar (USER.160)
|
||||
*/
|
||||
void WINAPI DrawMenuBar16( HWND16 hWnd )
|
||||
{
|
||||
DrawMenuBar( hWnd );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DrawMenuBar (USER32.@)
|
||||
*/
|
||||
|
@ -4702,21 +4633,6 @@ BOOL WINAPI GetMenuItemRect (HWND hwnd, HMENU hMenu, UINT uItem,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* GetMenuItemRect (USER.665)
|
||||
*/
|
||||
|
||||
BOOL16 WINAPI GetMenuItemRect16 (HWND16 hwnd, HMENU16 hMenu, UINT16 uItem,
|
||||
LPRECT16 rect)
|
||||
{
|
||||
RECT r32;
|
||||
BOOL res;
|
||||
|
||||
if (!rect) return FALSE;
|
||||
res = GetMenuItemRect (hwnd, hMenu, uItem, &r32);
|
||||
CONV_RECT32TO16 (&r32, rect);
|
||||
return res;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* SetMenuInfo (USER32.@)
|
||||
|
@ -5037,43 +4953,3 @@ INT WINAPI TranslateAccelerator( HWND hWnd, HACCEL hAccel, LPMSG msg )
|
|||
WARN_(accel)("couldn't translate accelerator key\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* TranslateAccelerator (USER.178)
|
||||
*/
|
||||
INT16 WINAPI TranslateAccelerator16( HWND16 hWnd, HACCEL16 hAccel, LPMSG16 msg )
|
||||
{
|
||||
LPACCEL16 lpAccelTbl;
|
||||
int i;
|
||||
|
||||
if (msg == NULL)
|
||||
{
|
||||
WARN_(accel)("msg null; should hang here to be win compatible\n");
|
||||
return 0;
|
||||
}
|
||||
if (!hAccel || !(lpAccelTbl = (LPACCEL16) LockResource16(hAccel)))
|
||||
{
|
||||
WARN_(accel)("invalid accel handle=%x\n", hAccel);
|
||||
return 0;
|
||||
}
|
||||
if ((msg->message != WM_KEYDOWN &&
|
||||
msg->message != WM_KEYUP &&
|
||||
msg->message != WM_SYSKEYDOWN &&
|
||||
msg->message != WM_SYSKEYUP &&
|
||||
msg->message != WM_CHAR)) return 0;
|
||||
|
||||
TRACE_(accel)("TranslateAccelerators hAccel=%04x, hWnd=%04x,"
|
||||
"msg->hwnd=%04x, msg->message=%04x, wParam=%04x, lParam=%lx\n",
|
||||
hAccel,hWnd,msg->hwnd,msg->message,msg->wParam,msg->lParam);
|
||||
|
||||
i = 0;
|
||||
do
|
||||
{
|
||||
if (translate_accelerator( hWnd, msg->message, msg->wParam, msg->lParam,
|
||||
lpAccelTbl[i].fVirt, lpAccelTbl[i].key, lpAccelTbl[i].cmd ))
|
||||
return 1;
|
||||
} while ((lpAccelTbl[i++].fVirt & 0x80) == 0);
|
||||
WARN_(accel)("couldn't translate accelerator key\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -883,7 +883,7 @@ static void SCROLL_HandleKbdEvent( HWND hwnd, WPARAM wParam )
|
|||
}
|
||||
SendMessageW( GetParent(hwnd),
|
||||
(GetWindowLongA( hwnd, GWL_STYLE ) & SBS_VERT) ? WM_VSCROLL : WM_HSCROLL,
|
||||
msg, hwnd );
|
||||
msg, (LPARAM)hwnd );
|
||||
}
|
||||
|
||||
|
||||
|
@ -974,7 +974,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
|
|||
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
|
||||
{
|
||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
SB_LINEUP, hwndCtl );
|
||||
SB_LINEUP, (LPARAM)hwndCtl );
|
||||
}
|
||||
|
||||
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
|
||||
|
@ -993,7 +993,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
|
|||
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
|
||||
{
|
||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
SB_PAGEUP, hwndCtl );
|
||||
SB_PAGEUP, (LPARAM)hwndCtl );
|
||||
}
|
||||
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
|
||||
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
|
||||
|
@ -1042,7 +1042,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
|
|||
SCROLL_TrackingPos );
|
||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
MAKEWPARAM( SB_THUMBTRACK, SCROLL_TrackingVal),
|
||||
hwndCtl );
|
||||
(LPARAM)hwndCtl );
|
||||
if (!SCROLL_MovingThumb)
|
||||
SCROLL_DrawMovingThumb( hdc, &rect, vertical,
|
||||
arrowSize, thumbSize );
|
||||
|
@ -1059,7 +1059,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
|
|||
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
|
||||
{
|
||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
SB_PAGEDOWN, hwndCtl );
|
||||
SB_PAGEDOWN, (LPARAM)hwndCtl );
|
||||
}
|
||||
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
|
||||
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
|
||||
|
@ -1076,7 +1076,7 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
|
|||
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
|
||||
{
|
||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
SB_LINEDOWN, hwndCtl );
|
||||
SB_LINEDOWN, (LPARAM)hwndCtl );
|
||||
}
|
||||
|
||||
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
|
||||
|
@ -1097,11 +1097,11 @@ void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
|
|||
UINT val = SCROLL_GetThumbVal( infoPtr, &rect, vertical,
|
||||
trackThumbPos + lastMousePos - lastClickPos );
|
||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
MAKEWPARAM( SB_THUMBPOSITION, val ), hwndCtl );
|
||||
MAKEWPARAM( SB_THUMBPOSITION, val ), (LPARAM)hwndCtl );
|
||||
}
|
||||
else
|
||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||
SB_ENDSCROLL, hwndCtl );
|
||||
SB_ENDSCROLL, (LPARAM)hwndCtl );
|
||||
}
|
||||
|
||||
ReleaseDC( hwnd, hdc );
|
||||
|
@ -1301,16 +1301,6 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* SetScrollInfo (USER.475)
|
||||
*/
|
||||
INT16 WINAPI SetScrollInfo16( HWND16 hwnd, INT16 nBar, const SCROLLINFO *info,
|
||||
BOOL16 bRedraw )
|
||||
{
|
||||
return (INT16)SetScrollInfo( hwnd, nBar, info, bRedraw );
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* SetScrollInfo (USER32.@)
|
||||
* SetScrollInfo can be used to set the position, upper bound,
|
||||
|
@ -1486,15 +1476,6 @@ done:
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* GetScrollInfo (USER.476)
|
||||
*/
|
||||
BOOL16 WINAPI GetScrollInfo16( HWND16 hwnd, INT16 nBar, LPSCROLLINFO info )
|
||||
{
|
||||
return GetScrollInfo( hwnd, nBar, info );
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* GetScrollInfo (USER32.@)
|
||||
* GetScrollInfo can be used to retrieve the position, upper bound,
|
||||
|
@ -1527,16 +1508,6 @@ BOOL WINAPI GetScrollInfo(
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* SetScrollPos (USER.62)
|
||||
*/
|
||||
INT16 WINAPI SetScrollPos16( HWND16 hwnd, INT16 nBar, INT16 nPos,
|
||||
BOOL16 bRedraw )
|
||||
{
|
||||
return (INT16)SetScrollPos( hwnd, nBar, nPos, bRedraw );
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* SetScrollPos (USER32.@)
|
||||
*
|
||||
|
@ -1568,15 +1539,6 @@ BOOL bRedraw /* [in] Should scrollbar be redrawn afterwards ? */ )
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* GetScrollPos (USER.63)
|
||||
*/
|
||||
INT16 WINAPI GetScrollPos16( HWND16 hwnd, INT16 nBar )
|
||||
{
|
||||
return (INT16)GetScrollPos( hwnd, nBar );
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* GetScrollPos (USER32.@)
|
||||
*
|
||||
|
@ -1599,18 +1561,6 @@ INT nBar /* [in] One of SB_HORZ, SB_VERT, or SB_CTL */)
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* SetScrollRange (USER.64)
|
||||
*/
|
||||
void WINAPI SetScrollRange16( HWND16 hwnd, INT16 nBar,
|
||||
INT16 MinVal, INT16 MaxVal, BOOL16 bRedraw )
|
||||
{
|
||||
/* Invalid range -> range is set to (0,0) */
|
||||
if ((INT)MaxVal - (INT)MinVal > 0x7fff) MinVal = MaxVal = 0;
|
||||
SetScrollRange( hwnd, nBar, MinVal, MaxVal, bRedraw );
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* SetScrollRange (USER32.@)
|
||||
*
|
||||
|
@ -1671,20 +1621,6 @@ INT SCROLL_SetNCSbState(HWND hwnd, int vMin, int vMax, int vPos,
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* GetScrollRange (USER.65)
|
||||
*/
|
||||
BOOL16 WINAPI GetScrollRange16( HWND16 hwnd, INT16 nBar,
|
||||
LPINT16 lpMin, LPINT16 lpMax)
|
||||
{
|
||||
INT min, max;
|
||||
BOOL16 ret = GetScrollRange( hwnd, nBar, &min, &max );
|
||||
if (lpMin) *lpMin = min;
|
||||
if (lpMax) *lpMax = max;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* GetScrollRange (USER32.@)
|
||||
*
|
||||
|
@ -1785,16 +1721,6 @@ END:
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* ShowScrollBar (USER.267)
|
||||
*/
|
||||
void WINAPI ShowScrollBar16( HWND16 hwnd, INT16 nBar, BOOL16 fShow )
|
||||
{
|
||||
SCROLL_ShowScrollBar( hwnd, nBar, (nBar == SB_VERT) ? 0 : fShow,
|
||||
(nBar == SB_HORZ) ? 0 : fShow );
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* ShowScrollBar (USER32.@)
|
||||
*
|
||||
|
@ -1811,15 +1737,6 @@ BOOL fShow /* [in] TRUE = show, FALSE = hide */)
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* EnableScrollBar (USER.482)
|
||||
*/
|
||||
BOOL16 WINAPI EnableScrollBar16( HWND16 hwnd, INT16 nBar, UINT16 flags )
|
||||
{
|
||||
return EnableScrollBar( hwnd, nBar, flags );
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* EnableScrollBar (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -27,6 +27,7 @@ C_SRCS = \
|
|||
text.c \
|
||||
thunk.c \
|
||||
user_main.c \
|
||||
wnd16.c \
|
||||
wsprintf.c
|
||||
|
||||
RC_SRCS = \
|
||||
|
|
|
@ -99,35 +99,30 @@ typedef struct
|
|||
|
||||
extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
|
||||
|
||||
/* Dialog info structure.
|
||||
* This structure is stored into the window extra bytes (cbWndExtra).
|
||||
* sizeof(DIALOGINFO) must be <= DLGWINDOWEXTRA (=30).
|
||||
*/
|
||||
#include "pshpack1.h"
|
||||
|
||||
/* Dialog info structure */
|
||||
typedef struct
|
||||
{
|
||||
INT msgResult; /* 00 Last message result */
|
||||
HWINDOWPROC dlgProc; /* 04 Dialog procedure */
|
||||
LONG userInfo; /* 08 User information (for DWL_USER) */
|
||||
|
||||
/* implementation-dependent part */
|
||||
|
||||
HWND16 hwndFocus; /* 0c Current control with focus */
|
||||
HFONT16 hUserFont; /* 0e Dialog font */
|
||||
HMENU16 hMenu; /* 10 Dialog menu */
|
||||
WORD xBaseUnit; /* 12 Dialog units (depends on the font) */
|
||||
WORD yBaseUnit; /* 14 */
|
||||
INT idResult; /* 16 EndDialog() result / default pushbutton ID */
|
||||
UINT16 flags; /* 1a EndDialog() called for this dialog */
|
||||
HGLOBAL16 hDialogHeap; /* 1c */
|
||||
HWND hwndFocus; /* Current control with focus */
|
||||
HFONT hUserFont; /* Dialog font */
|
||||
HMENU hMenu; /* Dialog menu */
|
||||
UINT xBaseUnit; /* Dialog units (depends on the font) */
|
||||
UINT yBaseUnit;
|
||||
INT idResult; /* EndDialog() result / default pushbutton ID */
|
||||
UINT flags; /* EndDialog() called for this dialog */
|
||||
HGLOBAL16 hDialogHeap;
|
||||
} DIALOGINFO;
|
||||
|
||||
#include "poppack.h"
|
||||
|
||||
#define DF_END 0x0001
|
||||
#define DF_OWNERENABLED 0x0002
|
||||
|
||||
/* offset of DIALOGINFO ptr in dialog extra bytes */
|
||||
#define DWL_WINE_DIALOGINFO (DWL_USER+sizeof(ULONG_PTR))
|
||||
|
||||
inline static DIALOGINFO *DIALOG_get_info( HWND hwnd )
|
||||
{
|
||||
return (DIALOGINFO *)GetWindowLongW( hwnd, DWL_WINE_DIALOGINFO );
|
||||
}
|
||||
|
||||
extern BOOL DIALOG_Init(void);
|
||||
|
||||
#endif /* __WINE_CONTROLS_H */
|
||||
|
|
|
@ -20,9 +20,10 @@ DEFAULT_DEBUG_CHANNEL(msg);
|
|||
/***********************************************************************
|
||||
* SendMessage (USER.111)
|
||||
*/
|
||||
LRESULT WINAPI SendMessage16( HWND16 hwnd, UINT16 msg, WPARAM16 wparam, LPARAM lparam )
|
||||
LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM lparam )
|
||||
{
|
||||
LRESULT result;
|
||||
HWND hwnd = WIN_Handle32( hwnd16 );
|
||||
|
||||
if (hwnd != HWND_BROADCAST &&
|
||||
GetWindowThreadProcessId( hwnd, NULL ) == GetCurrentThreadId())
|
||||
|
@ -37,12 +38,16 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd, UINT16 msg, WPARAM16 wparam, LPARAM l
|
|||
|
||||
if ((cwp = SEGPTR_NEW(CWPSTRUCT16)))
|
||||
{
|
||||
cwp->hwnd = hwnd;
|
||||
cwp->hwnd = hwnd16;
|
||||
cwp->message = msg;
|
||||
cwp->wParam = wparam;
|
||||
cwp->lParam = lparam;
|
||||
HOOK_CallHooks16( WH_CALLWNDPROC, HC_ACTION, 1, SEGPTR_GET(cwp) );
|
||||
hwnd = cwp->hwnd;
|
||||
if (cwp->hwnd != hwnd16)
|
||||
{
|
||||
hwnd16 = cwp->hwnd;
|
||||
hwnd = WIN_Handle32( hwnd16 );
|
||||
}
|
||||
msg = cwp->message;
|
||||
wparam = cwp->wParam;
|
||||
lparam = cwp->lParam;
|
||||
|
@ -50,10 +55,10 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd, UINT16 msg, WPARAM16 wparam, LPARAM l
|
|||
}
|
||||
}
|
||||
|
||||
if (!(winproc = (WNDPROC16)GetWindowLong16( hwnd, GWL_WNDPROC ))) return 0;
|
||||
if (!(winproc = (WNDPROC16)GetWindowLong16( hwnd16, GWL_WNDPROC ))) return 0;
|
||||
|
||||
SPY_EnterMessage( SPY_SENDMESSAGE16, hwnd, msg, wparam, lparam );
|
||||
result = CallWindowProc16( (WNDPROC16)winproc, hwnd, msg, wparam, lparam );
|
||||
result = CallWindowProc16( (WNDPROC16)winproc, hwnd16, msg, wparam, lparam );
|
||||
SPY_ExitMessage( SPY_RESULT_OK16, hwnd, msg, result, wparam, lparam );
|
||||
}
|
||||
else /* map to 32-bit unicode for inter-thread/process message */
|
||||
|
@ -73,10 +78,11 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd, UINT16 msg, WPARAM16 wparam, LPARAM l
|
|||
/***********************************************************************
|
||||
* PostMessage (USER.110)
|
||||
*/
|
||||
BOOL16 WINAPI PostMessage16( HWND16 hwnd, UINT16 msg, WPARAM16 wparam, LPARAM lparam )
|
||||
BOOL16 WINAPI PostMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM lparam )
|
||||
{
|
||||
WPARAM wparam32;
|
||||
UINT msg32;
|
||||
HWND hwnd = WIN_Handle32( hwnd16 );
|
||||
|
||||
switch (WINPROC_MapMsg16To32W( hwnd, msg, wparam, &msg32, &wparam32, &lparam ))
|
||||
{
|
||||
|
@ -136,15 +142,16 @@ void WINAPI ReplyMessage16( LRESULT result )
|
|||
/***********************************************************************
|
||||
* PeekMessage32 (USER.819)
|
||||
*/
|
||||
BOOL16 WINAPI PeekMessage32_16( MSG32_16 *msg16, HWND16 hwnd,
|
||||
BOOL16 WINAPI PeekMessage32_16( MSG32_16 *msg16, HWND16 hwnd16,
|
||||
UINT16 first, UINT16 last, UINT16 flags,
|
||||
BOOL16 wHaveParamHigh )
|
||||
{
|
||||
MSG msg;
|
||||
HWND hwnd = WIN_Handle32( hwnd16 );
|
||||
|
||||
if (!PeekMessageW( &msg, hwnd, first, last, flags )) return FALSE;
|
||||
|
||||
msg16->msg.hwnd = msg.hwnd;
|
||||
msg16->msg.hwnd = WIN_Handle16( msg.hwnd );
|
||||
msg16->msg.lParam = msg.lParam;
|
||||
msg16->msg.time = msg.time;
|
||||
msg16->msg.pt.x = (INT16)msg.pt.x;
|
||||
|
@ -170,15 +177,16 @@ BOOL16 WINAPI PeekMessage16( MSG16 *msg, HWND16 hwnd,
|
|||
/***********************************************************************
|
||||
* GetMessage32 (USER.820)
|
||||
*/
|
||||
BOOL16 WINAPI GetMessage32_16( MSG32_16 *msg16, HWND16 hwnd, UINT16 first,
|
||||
BOOL16 WINAPI GetMessage32_16( MSG32_16 *msg16, HWND16 hwnd16, UINT16 first,
|
||||
UINT16 last, BOOL16 wHaveParamHigh )
|
||||
{
|
||||
MSG msg;
|
||||
HWND hwnd = WIN_Handle32( hwnd16 );
|
||||
|
||||
do
|
||||
{
|
||||
GetMessageW( &msg, hwnd, first, last );
|
||||
msg16->msg.hwnd = msg.hwnd;
|
||||
msg16->msg.hwnd = WIN_Handle16( msg.hwnd );
|
||||
msg16->msg.lParam = msg.lParam;
|
||||
msg16->msg.time = msg.time;
|
||||
msg16->msg.pt.x = (INT16)msg.pt.x;
|
||||
|
@ -212,7 +220,7 @@ BOOL16 WINAPI TranslateMessage32_16( const MSG32_16 *msg, BOOL16 wHaveParamHigh
|
|||
{
|
||||
MSG msg32;
|
||||
|
||||
msg32.hwnd = msg->msg.hwnd;
|
||||
msg32.hwnd = WIN_Handle32( msg->msg.hwnd );
|
||||
msg32.message = msg->msg.message;
|
||||
msg32.wParam = MAKEWPARAM( msg->msg.wParam, wHaveParamHigh ? msg->wParamHigh : 0 );
|
||||
msg32.lParam = msg->msg.lParam;
|
||||
|
@ -238,6 +246,7 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
|
|||
WNDPROC16 winproc;
|
||||
LONG retval;
|
||||
int painting;
|
||||
HWND hwnd = WIN_Handle32( msg->hwnd );
|
||||
|
||||
/* Process timer messages */
|
||||
if ((msg->message == WM_TIMER) || (msg->message == WM_SYSTIMER))
|
||||
|
@ -247,7 +256,7 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
|
|||
/* before calling window proc, verify whether timer is still valid;
|
||||
there's a slim chance that the application kills the timer
|
||||
between GetMessage and DispatchMessage API calls */
|
||||
if (!TIMER_IsTimerValid(msg->hwnd, (UINT) msg->wParam, (HWINDOWPROC) msg->lParam))
|
||||
if (!TIMER_IsTimerValid(hwnd, (UINT) msg->wParam, (HWINDOWPROC) msg->lParam))
|
||||
return 0; /* invalid winproc */
|
||||
|
||||
return CallWindowProc16( (WNDPROC16)msg->lParam, msg->hwnd,
|
||||
|
@ -255,7 +264,7 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
|
|||
}
|
||||
}
|
||||
|
||||
if (!(wndPtr = WIN_FindWndPtr( msg->hwnd ))) return 0;
|
||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
|
||||
if (!wndPtr->winproc)
|
||||
{
|
||||
WIN_ReleaseWndPtr( wndPtr );
|
||||
|
@ -266,23 +275,24 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
|
|||
if (painting) wndPtr->flags |= WIN_NEEDS_BEGINPAINT;
|
||||
WIN_ReleaseWndPtr( wndPtr );
|
||||
|
||||
SPY_EnterMessage( SPY_DISPATCHMESSAGE16, msg->hwnd, msg->message, msg->wParam, msg->lParam );
|
||||
SPY_EnterMessage( SPY_DISPATCHMESSAGE16, hwnd, msg->message, msg->wParam, msg->lParam );
|
||||
retval = CallWindowProc16( winproc, msg->hwnd, msg->message, msg->wParam, msg->lParam );
|
||||
SPY_ExitMessage( SPY_RESULT_OK16, msg->hwnd, msg->message, retval, msg->wParam, msg->lParam );
|
||||
SPY_ExitMessage( SPY_RESULT_OK16, hwnd, msg->message, retval, msg->wParam, msg->lParam );
|
||||
|
||||
if (!painting) return retval;
|
||||
|
||||
if ((wndPtr = WIN_FindWndPtr( msg->hwnd )))
|
||||
if ((wndPtr = WIN_FindWndPtr( hwnd )))
|
||||
{
|
||||
if ((wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate)
|
||||
{
|
||||
ERR( "BeginPaint not called on WM_PAINT for hwnd %04x!\n", msg->hwnd );
|
||||
wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT;
|
||||
WIN_ReleaseWndPtr( wndPtr );
|
||||
/* Validate the update region to avoid infinite WM_PAINT loop */
|
||||
RedrawWindow( wndPtr->hwndSelf, NULL, 0,
|
||||
RedrawWindow( hwnd, NULL, 0,
|
||||
RDW_NOFRAME | RDW_VALIDATE | RDW_NOCHILDREN | RDW_NOINTERNALPAINT );
|
||||
}
|
||||
WIN_ReleaseWndPtr( wndPtr );
|
||||
else WIN_ReleaseWndPtr( wndPtr );
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
@ -299,7 +309,7 @@ LONG WINAPI DispatchMessage32_16( const MSG32_16 *msg16, BOOL16 wHaveParamHigh )
|
|||
{
|
||||
MSG msg;
|
||||
|
||||
msg.hwnd = msg16->msg.hwnd;
|
||||
msg.hwnd = WIN_Handle32( msg16->msg.hwnd );
|
||||
msg.message = msg16->msg.message;
|
||||
msg.wParam = MAKEWPARAM( msg16->msg.wParam, msg16->wParamHigh );
|
||||
msg.lParam = msg16->msg.lParam;
|
||||
|
@ -374,3 +384,38 @@ BOOL16 WINAPI GetInputState16(void)
|
|||
{
|
||||
return GetInputState();
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* TranslateAccelerator (USER.178)
|
||||
*/
|
||||
INT16 WINAPI TranslateAccelerator16( HWND16 hwnd, HACCEL16 hAccel, LPMSG16 msg )
|
||||
{
|
||||
MSG msg32;
|
||||
|
||||
if (!msg) return 0;
|
||||
msg32.message = msg->message;
|
||||
/* msg32.hwnd not used */
|
||||
msg32.wParam = msg->wParam;
|
||||
msg32.lParam = msg->lParam;
|
||||
return TranslateAccelerator( WIN_Handle32(hwnd), hAccel, &msg32 );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* TranslateMDISysAccel (USER.451)
|
||||
*/
|
||||
BOOL16 WINAPI TranslateMDISysAccel16( HWND16 hwndClient, LPMSG16 msg )
|
||||
{
|
||||
if (msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN)
|
||||
{
|
||||
MSG msg32;
|
||||
msg32.hwnd = WIN_Handle32(msg->hwnd);
|
||||
msg32.message = msg->message;
|
||||
msg32.wParam = msg->wParam;
|
||||
msg32.lParam = msg->lParam;
|
||||
/* MDICLIENTINFO is still the same for win32 and win16 ... */
|
||||
return TranslateMDISysAccel( WIN_Handle32(hwndClient), &msg32 );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "windef.h"
|
||||
#include "wingdi.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "win.h"
|
||||
#include "callback.h"
|
||||
|
||||
/* ### start build ### */
|
||||
|
@ -33,7 +34,7 @@ BOOL16 WINAPI EnumWindows16( WNDENUMPROC16 func, LPARAM lParam )
|
|||
BOOL16 WINAPI EnumChildWindows16( HWND16 parent, WNDENUMPROC16 func, LPARAM lParam )
|
||||
{
|
||||
DECL_THUNK( thunk, func, THUNK_CallTo16_word_wl );
|
||||
return EnumChildWindows( parent, (WNDENUMPROC)&thunk, lParam );
|
||||
return EnumChildWindows( WIN_Handle32(parent), (WNDENUMPROC)&thunk, lParam );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ rsrc resources/version16.res
|
|||
16 pascal16 ClipCursor(ptr) ClipCursor16
|
||||
17 pascal16 GetCursorPos(ptr) GetCursorPos16
|
||||
18 pascal16 SetCapture(word) SetCapture16
|
||||
19 pascal16 ReleaseCapture() ReleaseCapture
|
||||
19 pascal16 ReleaseCapture() ReleaseCapture16
|
||||
20 pascal16 SetDoubleClickTime(word) SetDoubleClickTime16
|
||||
21 pascal16 GetDoubleClickTime() GetDoubleClickTime16
|
||||
22 pascal16 SetFocus(word) SetFocus16
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -651,6 +651,10 @@ static BOOL fixup_flags( WINDOWPOS *winpos )
|
|||
|
||||
/* Check hwndInsertAfter */
|
||||
|
||||
/* fix sign extension */
|
||||
if (winpos->hwndInsertAfter == (HWND)0xffff) winpos->hwndInsertAfter = HWND_TOPMOST;
|
||||
else if (winpos->hwndInsertAfter == (HWND)0xfffe) winpos->hwndInsertAfter = HWND_NOTOPMOST;
|
||||
|
||||
/* FIXME: TOPMOST not supported yet */
|
||||
if ((winpos->hwndInsertAfter == HWND_TOPMOST) ||
|
||||
(winpos->hwndInsertAfter == HWND_NOTOPMOST)) winpos->hwndInsertAfter = HWND_TOP;
|
||||
|
@ -928,7 +932,7 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
|
|||
size.x = wndPtr->rectWindow.left;
|
||||
size.y = wndPtr->rectWindow.top;
|
||||
|
||||
if (!HOOK_CallHooksA(WH_CBT, HCBT_MINMAX, wndPtr->hwndSelf, cmd))
|
||||
if (!HOOK_CallHooksA(WH_CBT, HCBT_MINMAX, (WPARAM)wndPtr->hwndSelf, cmd))
|
||||
{
|
||||
if( wndPtr->dwStyle & WS_MINIMIZE )
|
||||
{
|
||||
|
@ -1649,7 +1653,7 @@ static LONG start_size_move( HWND hwnd, WPARAM wParam, POINT *capturePoint, LONG
|
|||
*capturePoint = pt;
|
||||
}
|
||||
SetCursorPos( pt.x, pt.y );
|
||||
NC_HandleSetCursor( hwnd, hwnd, MAKELONG( hittest, WM_MOUSEMOVE ));
|
||||
NC_HandleSetCursor( hwnd, (WPARAM)hwnd, MAKELONG( hittest, WM_MOUSEMOVE ));
|
||||
return hittest;
|
||||
}
|
||||
|
||||
|
@ -1901,7 +1905,7 @@ void X11DRV_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
|
|||
}
|
||||
wine_tsx11_unlock();
|
||||
|
||||
if (HOOK_CallHooksA( WH_CBT, HCBT_MOVESIZE, hwnd, (LPARAM)&sizingRect )) moved = FALSE;
|
||||
if (HOOK_CallHooksA( WH_CBT, HCBT_MOVESIZE, (WPARAM)hwnd, (LPARAM)&sizingRect )) moved = FALSE;
|
||||
|
||||
SendMessageA( hwnd, WM_EXITSIZEMOVE, 0, 0 );
|
||||
SendMessageA( hwnd, WM_SETVISIBLE, !IsIconic(hwnd), 0L);
|
||||
|
|
|
@ -62,7 +62,7 @@ typedef struct
|
|||
RECT16 rectNormal;
|
||||
POINT16 ptIconPos;
|
||||
POINT16 ptMaxPos;
|
||||
HWND16 hwndIconTitle;
|
||||
HWND hwndIconTitle;
|
||||
} INTERNALPOS, *LPINTERNALPOS;
|
||||
|
||||
/* WND flags values */
|
||||
|
@ -107,6 +107,12 @@ inline static HWND16 WIN_Handle16( HWND hwnd )
|
|||
return LOWORD(hwnd);
|
||||
}
|
||||
|
||||
inline static WND *WIN_FindWndPtr16( HWND16 hwnd )
|
||||
{
|
||||
/* don't bother with full conversion */
|
||||
return WIN_FindWndPtr( (HWND)(ULONG_PTR)hwnd );
|
||||
}
|
||||
|
||||
extern HWND CARET_GetHwnd(void);
|
||||
extern void CARET_GetRect(LPRECT lprc); /* windows/caret.c */
|
||||
|
||||
|
|
|
@ -52,10 +52,10 @@ extern INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam,
|
|||
LPARAM *plparam );
|
||||
extern INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam,
|
||||
LPARAM *plparam );
|
||||
extern INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16,
|
||||
extern INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16,
|
||||
UINT *pmsg32, WPARAM *pwparam32,
|
||||
LPARAM *plparam );
|
||||
extern INT WINPROC_MapMsg16To32W( HWND16, UINT16 msg16, WPARAM16 wParam16,
|
||||
extern INT WINPROC_MapMsg16To32W( HWND hwnd, UINT16 msg16, WPARAM16 wParam16,
|
||||
UINT *pmsg32, WPARAM *pwparam32,
|
||||
LPARAM *plparam );
|
||||
extern INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32,
|
||||
|
@ -68,9 +68,9 @@ extern LRESULT WINPROC_UnmapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM wParam,
|
|||
LPARAM lParam, LRESULT result );
|
||||
extern void WINPROC_UnmapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam,
|
||||
LPARAM lParam );
|
||||
extern LRESULT WINPROC_UnmapMsg16To32A( HWND16 hwnd, UINT msg, WPARAM wParam,
|
||||
extern LRESULT WINPROC_UnmapMsg16To32A( HWND hwnd, UINT msg, WPARAM wParam,
|
||||
LPARAM lParam, LRESULT result );
|
||||
extern LRESULT WINPROC_UnmapMsg16To32W( HWND16 hwnd, UINT msg, WPARAM wParam,
|
||||
extern LRESULT WINPROC_UnmapMsg16To32W( HWND hwnd, UINT msg, WPARAM wParam,
|
||||
LPARAM lParam, LRESULT result );
|
||||
extern void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam,
|
||||
LPARAM lParam, MSGPARAM16* pm16 );
|
||||
|
|
|
@ -1070,12 +1070,9 @@ typedef struct {
|
|||
#define GWL_USERDATA (-21)
|
||||
#define GWL_EXSTYLE (-20)
|
||||
#define GWL_STYLE (-16)
|
||||
#define GWW_ID (-12)
|
||||
#define GWL_ID GWW_ID
|
||||
#define GWW_HWNDPARENT (-8)
|
||||
#define GWL_HWNDPARENT GWW_HWNDPARENT
|
||||
#define GWW_HINSTANCE (-6)
|
||||
#define GWL_HINSTANCE GWW_HINSTANCE
|
||||
#define GWL_ID (-12)
|
||||
#define GWL_HWNDPARENT (-8)
|
||||
#define GWL_HINSTANCE (-6)
|
||||
#define GWL_WNDPROC (-4)
|
||||
#define DWL_MSGRESULT 0
|
||||
#define DWL_DLGPROC 4
|
||||
|
|
|
@ -128,15 +128,6 @@ static void CARET_KillTimer(void)
|
|||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* CreateCaret (USER.163)
|
||||
*/
|
||||
void WINAPI CreateCaret16( HWND16 hwnd, HBITMAP16 bitmap,
|
||||
INT16 width, INT16 height )
|
||||
{
|
||||
CreateCaret( hwnd, bitmap, width, height );
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* CreateCaret (USER32.@)
|
||||
*/
|
||||
|
@ -238,15 +229,6 @@ BOOL WINAPI SetCaretPos( INT x, INT y)
|
|||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* HideCaret (USER.166)
|
||||
*/
|
||||
void WINAPI HideCaret16( HWND16 hwnd )
|
||||
{
|
||||
HideCaret( hwnd );
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* HideCaret (USER32.@)
|
||||
*/
|
||||
|
@ -265,15 +247,6 @@ BOOL WINAPI HideCaret( HWND hwnd )
|
|||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* ShowCaret (USER.167)
|
||||
*/
|
||||
void WINAPI ShowCaret16( HWND16 hwnd )
|
||||
{
|
||||
ShowCaret( hwnd );
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* ShowCaret (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -697,14 +697,6 @@ BOOL WINAPI UnregisterClassW( LPCWSTR className, HINSTANCE hInstance )
|
|||
return CLASS_FreeClass( classPtr );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetClassWord (USER.129)
|
||||
*/
|
||||
WORD WINAPI GetClassWord16( HWND16 hwnd, INT16 offset )
|
||||
{
|
||||
return GetClassWord( hwnd, offset );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetClassWord (USER32.@)
|
||||
|
@ -762,15 +754,15 @@ LONG WINAPI GetClassLong16( HWND16 hwnd, INT16 offset )
|
|||
switch( offset )
|
||||
{
|
||||
case GCL_WNDPROC:
|
||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
|
||||
if (!(wndPtr = WIN_FindWndPtr16( hwnd ))) return 0;
|
||||
ret = (LONG)CLASS_GetProc( wndPtr->class, WIN_PROC_16 );
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
return ret;
|
||||
case GCL_MENUNAME:
|
||||
ret = GetClassLongA( hwnd, offset );
|
||||
ret = GetClassLongA( WIN_Handle32(hwnd), offset );
|
||||
return (LONG)SEGPTR_GET( (void *)ret );
|
||||
default:
|
||||
return GetClassLongA( hwnd, offset );
|
||||
return GetClassLongA( WIN_Handle32(hwnd), offset );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -867,15 +859,6 @@ LONG WINAPI GetClassLongW( HWND hwnd, INT offset )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetClassWord (USER.130)
|
||||
*/
|
||||
WORD WINAPI SetClassWord16( HWND16 hwnd, INT16 offset, WORD newval )
|
||||
{
|
||||
return SetClassWord( hwnd, offset, newval );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetClassWord (USER32.@)
|
||||
*/
|
||||
|
@ -939,14 +922,15 @@ LONG WINAPI SetClassLong16( HWND16 hwnd, INT16 offset, LONG newval )
|
|||
switch(offset)
|
||||
{
|
||||
case GCL_WNDPROC:
|
||||
if (!(wndPtr = WIN_FindWndPtr(hwnd))) return 0;
|
||||
if (!(wndPtr = WIN_FindWndPtr16(hwnd))) return 0;
|
||||
retval = (LONG)CLASS_SetProc( wndPtr->class, (WNDPROC)newval, WIN_PROC_16 );
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
return retval;
|
||||
case GCL_MENUNAME:
|
||||
return SetClassLongA( hwnd, offset, (LONG)MapSL(newval) );
|
||||
newval = (LONG)MapSL( newval );
|
||||
/* fall through */
|
||||
default:
|
||||
return SetClassLongA( hwnd, offset, newval );
|
||||
return SetClassLongA( WIN_Handle32(hwnd), offset, newval );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1051,15 +1035,6 @@ LONG WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetClassName (USER.58)
|
||||
*/
|
||||
INT16 WINAPI GetClassName16( HWND16 hwnd, LPSTR buffer, INT16 count )
|
||||
{
|
||||
return GetClassNameA( hwnd, buffer, count );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetClassNameA (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -710,15 +710,6 @@ static UINT CLIPBOARD_EnumClipboardFormats( UINT wFormat )
|
|||
* WIN32 Clipboard implementation
|
||||
**************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* OpenClipboard (USER.137)
|
||||
*/
|
||||
BOOL16 WINAPI OpenClipboard16( HWND16 hWnd )
|
||||
{
|
||||
return OpenClipboard( hWnd );
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* OpenClipboard (USER32.@)
|
||||
*
|
||||
|
@ -816,17 +807,6 @@ BOOL WINAPI EmptyClipboard(void)
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetClipboardOwner (USER.140)
|
||||
* FIXME: Can't return the owner if the clipbard is owned by an external app
|
||||
*/
|
||||
HWND16 WINAPI GetClipboardOwner16(void)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return hWndClipOwner;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetClipboardOwner (USER32.@)
|
||||
* FIXME: Can't return the owner if the clipbard is owned by an external app
|
||||
|
@ -1299,16 +1279,6 @@ INT WINAPI GetClipboardFormatNameW( UINT wFormat, LPWSTR retStr, INT maxlen )
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* SetClipboardViewer (USER.147)
|
||||
*/
|
||||
HWND16 WINAPI SetClipboardViewer16( HWND16 hWnd )
|
||||
{
|
||||
TRACE("(%04x)\n", hWnd);
|
||||
return SetClipboardViewer( hWnd );
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* SetClipboardViewer (USER32.@)
|
||||
*/
|
||||
|
@ -1323,16 +1293,6 @@ HWND WINAPI SetClipboardViewer( HWND hWnd )
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetClipboardViewer (USER.148)
|
||||
*/
|
||||
HWND16 WINAPI GetClipboardViewer16(void)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return hWndViewer;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetClipboardViewer (USER32.@)
|
||||
*/
|
||||
|
@ -1343,15 +1303,6 @@ HWND WINAPI GetClipboardViewer(void)
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* ChangeClipboardChain (USER.149)
|
||||
*/
|
||||
BOOL16 WINAPI ChangeClipboardChain16(HWND16 hWnd, HWND16 hWndNext)
|
||||
{
|
||||
return ChangeClipboardChain(hWnd, hWndNext);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* ChangeClipboardChain (USER32.@)
|
||||
*/
|
||||
|
@ -1403,17 +1354,6 @@ BOOL WINAPI IsClipboardFormatAvailable( UINT wFormat )
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetOpenClipboardWindow (USER.248)
|
||||
* FIXME: This wont work if an external app owns the selection
|
||||
*/
|
||||
HWND16 WINAPI GetOpenClipboardWindow16(void)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return hWndClipWindow;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetOpenClipboardWindow (USER32.@)
|
||||
* FIXME: This wont work if an external app owns the selection
|
||||
|
@ -1425,35 +1365,18 @@ HWND WINAPI GetOpenClipboardWindow(void)
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetPriorityClipboardFormat (USER.402)
|
||||
*/
|
||||
INT16 WINAPI GetPriorityClipboardFormat16( UINT16 *lpPriorityList, INT16 nCount)
|
||||
{
|
||||
FIXME("(%p,%d): stub\n", lpPriorityList, nCount );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetPriorityClipboardFormat (USER32.@)
|
||||
*/
|
||||
INT WINAPI GetPriorityClipboardFormat( UINT *lpPriorityList, INT nCount )
|
||||
INT WINAPI GetPriorityClipboardFormat( UINT *list, INT nCount )
|
||||
{
|
||||
int Counter;
|
||||
int i;
|
||||
TRACE("()\n");
|
||||
|
||||
if(CountClipboardFormats() == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
for(Counter = 0; Counter <= nCount; Counter++)
|
||||
{
|
||||
if(IsClipboardFormatAvailable(*(lpPriorityList+sizeof(INT)*Counter)))
|
||||
return *(lpPriorityList+sizeof(INT)*Counter);
|
||||
}
|
||||
if(CountClipboardFormats() == 0) return 0;
|
||||
|
||||
for (i = 0; i < nCount; i++)
|
||||
if (IsClipboardFormatAvailable( list[i] )) return list[i];
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -367,15 +367,6 @@ INT DCE_ExcludeRgn( HDC hDC, HWND hwnd, HRGN hRgn )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDCEx (USER.359)
|
||||
*/
|
||||
HDC16 WINAPI GetDCEx16( HWND16 hwnd, HRGN16 hrgnClip, DWORD flags )
|
||||
{
|
||||
return (HDC16)GetDCEx( hwnd, hrgnClip, flags );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDCEx (USER32.@)
|
||||
*
|
||||
|
@ -531,15 +522,6 @@ END:
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDC (USER.66)
|
||||
*/
|
||||
HDC16 WINAPI GetDC16( HWND16 hwnd )
|
||||
{
|
||||
return (HDC16)GetDC( hwnd );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDC (USER32.@)
|
||||
* RETURNS
|
||||
|
@ -555,15 +537,6 @@ HDC WINAPI GetDC(
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetWindowDC (USER.67)
|
||||
*/
|
||||
HDC16 WINAPI GetWindowDC16( HWND16 hwnd )
|
||||
{
|
||||
return GetDCEx16( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetWindowDC (USER32.@)
|
||||
*/
|
||||
|
@ -573,15 +546,6 @@ HDC WINAPI GetWindowDC( HWND hwnd )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ReleaseDC (USER.68)
|
||||
*/
|
||||
INT16 WINAPI ReleaseDC16( HWND16 hwnd, HDC16 hdc )
|
||||
{
|
||||
return (INT16)ReleaseDC( hwnd, hdc );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ReleaseDC (USER32.@)
|
||||
*
|
||||
|
@ -670,15 +634,6 @@ BOOL16 WINAPI DCHook16( HDC16 hDC, WORD code, DWORD data, LPARAM lParam )
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* WindowFromDC (USER.117)
|
||||
*/
|
||||
HWND16 WINAPI WindowFromDC16( HDC16 hDC )
|
||||
{
|
||||
return (HWND16)WindowFromDC( hDC );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* WindowFromDC (USER32.@)
|
||||
*/
|
||||
|
@ -699,14 +654,6 @@ HWND WINAPI WindowFromDC( HDC hDC )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LockWindowUpdate (USER.294)
|
||||
*/
|
||||
BOOL16 WINAPI LockWindowUpdate16( HWND16 hwnd )
|
||||
{
|
||||
return LockWindowUpdate( hwnd );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* LockWindowUpdate (USER32.@)
|
||||
*/
|
||||
|
|
147
windows/defdlg.c
147
windows/defdlg.c
|
@ -14,6 +14,21 @@
|
|||
#include "winproc.h"
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DEFDLG_GetDlgProc
|
||||
*/
|
||||
static WNDPROC DEFDLG_GetDlgProc( HWND hwnd )
|
||||
{
|
||||
WNDPROC ret = 0;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
if (wndPtr)
|
||||
{
|
||||
ret = *(WNDPROC *)((char *)wndPtr->wExtra + DWL_DLGPROC);
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DEFDLG_SetFocus
|
||||
*
|
||||
|
@ -41,14 +56,11 @@ static void DEFDLG_SetFocus( HWND hwndDlg, HWND hwndCtrl )
|
|||
static void DEFDLG_SaveFocus( HWND hwnd )
|
||||
{
|
||||
DIALOGINFO *infoPtr;
|
||||
WND *wndPtr;
|
||||
HWND hwndFocus = GetFocus();
|
||||
|
||||
if (!hwndFocus || !IsChild( hwnd, hwndFocus )) return;
|
||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return;
|
||||
infoPtr = (DIALOGINFO *)&wndPtr->wExtra;
|
||||
if (!(infoPtr = DIALOG_get_info( hwnd ))) return;
|
||||
infoPtr->hwndFocus = hwndFocus;
|
||||
WIN_ReleaseWndPtr( wndPtr );
|
||||
/* Remove default button */
|
||||
}
|
||||
|
||||
|
@ -59,24 +71,18 @@ static void DEFDLG_SaveFocus( HWND hwnd )
|
|||
static void DEFDLG_RestoreFocus( HWND hwnd )
|
||||
{
|
||||
DIALOGINFO *infoPtr;
|
||||
WND *wndPtr;
|
||||
|
||||
if (IsIconic( hwnd )) return;
|
||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return;
|
||||
infoPtr = (DIALOGINFO *)&wndPtr->wExtra;
|
||||
if (IsWindow( infoPtr->hwndFocus ))
|
||||
if (!(infoPtr = DIALOG_get_info( hwnd ))) return;
|
||||
if (!IsWindow( infoPtr->hwndFocus )) return;
|
||||
/* Don't set the focus back to controls if EndDialog is already called.*/
|
||||
if (!(infoPtr->flags & DF_END))
|
||||
{
|
||||
/* Don't set the focus back to controls if EndDialog is already called.*/
|
||||
if (!(infoPtr->flags & DF_END))
|
||||
{
|
||||
WIN_ReleaseWndPtr( wndPtr );
|
||||
DEFDLG_SetFocus( hwnd, infoPtr->hwndFocus );
|
||||
return;
|
||||
}
|
||||
/* This used to set infoPtr->hwndFocus to NULL for no apparent reason,
|
||||
sometimes losing focus when receiving WM_SETFOCUS messages. */
|
||||
DEFDLG_SetFocus( hwnd, infoPtr->hwndFocus );
|
||||
return;
|
||||
}
|
||||
WIN_ReleaseWndPtr( wndPtr );
|
||||
/* This used to set infoPtr->hwndFocus to NULL for no apparent reason,
|
||||
sometimes losing focus when receiving WM_SETFOCUS messages. */
|
||||
}
|
||||
|
||||
|
||||
|
@ -138,38 +144,33 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
|
|||
switch(msg)
|
||||
{
|
||||
case WM_ERASEBKGND:
|
||||
FillWindow16( hwnd, hwnd, (HDC16)wParam, (HBRUSH16)CTLCOLOR_DLG );
|
||||
return 1;
|
||||
|
||||
{
|
||||
HBRUSH brush = SendMessageW( hwnd, WM_CTLCOLORDLG, wParam, (LPARAM)hwnd );
|
||||
if (!brush) brush = DefWindowProcW( hwnd, WM_CTLCOLORDLG, wParam, (LPARAM)hwnd );
|
||||
if (brush)
|
||||
{
|
||||
RECT rect;
|
||||
HDC hdc = (HDC)wParam;
|
||||
GetClientRect( hwnd, &rect );
|
||||
DPtoLP( hdc, (LPPOINT)&rect, 2 );
|
||||
FillRect( hdc, &rect, brush );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
case WM_NCDESTROY:
|
||||
|
||||
/* Free dialog heap (if created) */
|
||||
if (dlgInfo->hDialogHeap)
|
||||
{
|
||||
GlobalUnlock16(dlgInfo->hDialogHeap);
|
||||
GlobalFree16(dlgInfo->hDialogHeap);
|
||||
dlgInfo->hDialogHeap = 0;
|
||||
}
|
||||
|
||||
/* Delete font */
|
||||
if (dlgInfo->hUserFont)
|
||||
{
|
||||
DeleteObject( dlgInfo->hUserFont );
|
||||
dlgInfo->hUserFont = 0;
|
||||
}
|
||||
|
||||
/* Delete menu */
|
||||
if (dlgInfo->hMenu)
|
||||
{
|
||||
DestroyMenu( dlgInfo->hMenu );
|
||||
dlgInfo->hMenu = 0;
|
||||
}
|
||||
|
||||
/* Delete window procedure */
|
||||
WINPROC_FreeProc( dlgInfo->dlgProc, WIN_PROC_WINDOW );
|
||||
dlgInfo->dlgProc = (HWINDOWPROC)0;
|
||||
dlgInfo->flags |= DF_END; /* just in case */
|
||||
|
||||
if ((dlgInfo = (DIALOGINFO *)SetWindowLongW( hwnd, DWL_WINE_DIALOGINFO, 0 )))
|
||||
{
|
||||
/* Free dialog heap (if created) */
|
||||
if (dlgInfo->hDialogHeap)
|
||||
{
|
||||
GlobalUnlock16(dlgInfo->hDialogHeap);
|
||||
GlobalFree16(dlgInfo->hDialogHeap);
|
||||
}
|
||||
if (dlgInfo->hUserFont) DeleteObject( dlgInfo->hUserFont );
|
||||
if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu );
|
||||
WINPROC_FreeProc( DEFDLG_GetDlgProc( hwnd ), WIN_PROC_WINDOW );
|
||||
HeapFree( GetProcessHeap(), 0, dlgInfo );
|
||||
}
|
||||
/* Window clean-up */
|
||||
return DefWindowProcA( hwnd, msg, wParam, lParam );
|
||||
|
||||
|
@ -263,18 +264,13 @@ static LRESULT DEFDLG_Epilog(HWND hwnd, UINT msg, BOOL fResult)
|
|||
LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
|
||||
LPARAM lParam )
|
||||
{
|
||||
DIALOGINFO * dlgInfo;
|
||||
WNDPROC16 dlgproc;
|
||||
HWND hwnd32 = WIN_Handle32( hwnd );
|
||||
BOOL result = FALSE;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
if (!wndPtr) return 0;
|
||||
dlgInfo = (DIALOGINFO *)&wndPtr->wExtra;
|
||||
dlgInfo->msgResult = 0;
|
||||
dlgproc = (WNDPROC16)dlgInfo->dlgProc;
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
SetWindowLongW( hwnd32, DWL_MSGRESULT, 0 );
|
||||
|
||||
if (dlgproc)
|
||||
if ((dlgproc = (WNDPROC16)DEFDLG_GetDlgProc( hwnd32 )))
|
||||
{
|
||||
/* Call dialog procedure */
|
||||
result = CallWindowProc16( dlgproc, hwnd, msg, wParam, lParam );
|
||||
|
@ -283,7 +279,7 @@ LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
|
|||
result = LOWORD(result);
|
||||
}
|
||||
|
||||
if (!result && IsWindow(hwnd))
|
||||
if (!result && IsWindow(hwnd32))
|
||||
{
|
||||
/* callback didn't process this message */
|
||||
|
||||
|
@ -302,8 +298,7 @@ LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
|
|||
case WM_ENTERMENULOOP:
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_NCLBUTTONDOWN:
|
||||
return DEFDLG_Proc( (HWND)hwnd, msg,
|
||||
(WPARAM)wParam, lParam, dlgInfo );
|
||||
return DEFDLG_Proc( hwnd32, msg, (WPARAM)wParam, lParam, DIALOG_get_info(hwnd32) );
|
||||
case WM_INITDIALOG:
|
||||
case WM_VKEYTOITEM:
|
||||
case WM_COMPAREITEM:
|
||||
|
@ -314,28 +309,21 @@ LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
|
|||
return DefWindowProc16( hwnd, msg, wParam, lParam );
|
||||
}
|
||||
}
|
||||
return DEFDLG_Epilog(hwnd, msg, result);
|
||||
return DEFDLG_Epilog( hwnd32, msg, result);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DefDlgProcA (USER32.@)
|
||||
*/
|
||||
LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam )
|
||||
LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
DIALOGINFO * dlgInfo;
|
||||
WNDPROC dlgproc;
|
||||
BOOL result = FALSE;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
if (!wndPtr) return 0;
|
||||
dlgInfo = (DIALOGINFO *)&wndPtr->wExtra;
|
||||
dlgInfo->msgResult = 0;
|
||||
dlgproc = dlgInfo->dlgProc;
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
SetWindowLongW( hwnd, DWL_MSGRESULT, 0 );
|
||||
|
||||
if (dlgproc)
|
||||
if ((dlgproc = DEFDLG_GetDlgProc( hwnd )))
|
||||
{
|
||||
/* Call dialog procedure */
|
||||
result = CallWindowProcA( dlgproc, hwnd, msg, wParam, lParam );
|
||||
|
@ -363,7 +351,7 @@ LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg,
|
|||
case WM_ENTERMENULOOP:
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_NCLBUTTONDOWN:
|
||||
return DEFDLG_Proc( hwnd, msg, wParam, lParam, dlgInfo );
|
||||
return DEFDLG_Proc( hwnd, msg, wParam, lParam, DIALOG_get_info(hwnd) );
|
||||
case WM_INITDIALOG:
|
||||
case WM_VKEYTOITEM:
|
||||
case WM_COMPAREITEM:
|
||||
|
@ -381,21 +369,14 @@ LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg,
|
|||
/***********************************************************************
|
||||
* DefDlgProcW (USER32.@)
|
||||
*/
|
||||
LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam,
|
||||
LPARAM lParam )
|
||||
LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
DIALOGINFO * dlgInfo;
|
||||
BOOL result = FALSE;
|
||||
WNDPROC dlgproc;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
if (!wndPtr) return 0;
|
||||
dlgInfo = (DIALOGINFO *)&wndPtr->wExtra;
|
||||
dlgInfo->msgResult = 0;
|
||||
dlgproc = dlgInfo->dlgProc;
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
SetWindowLongW( hwnd, DWL_MSGRESULT, 0 );
|
||||
|
||||
if (dlgproc)
|
||||
if ((dlgproc = DEFDLG_GetDlgProc( hwnd )))
|
||||
{
|
||||
/* Call dialog procedure */
|
||||
result = CallWindowProcW( dlgproc, hwnd, msg, wParam, lParam );
|
||||
|
@ -423,7 +404,7 @@ LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam,
|
|||
case WM_ENTERMENULOOP:
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_NCLBUTTONDOWN:
|
||||
return DEFDLG_Proc( hwnd, msg, wParam, lParam, dlgInfo );
|
||||
return DEFDLG_Proc( hwnd, msg, wParam, lParam, DIALOG_get_info(hwnd) );
|
||||
case WM_INITDIALOG:
|
||||
case WM_VKEYTOITEM:
|
||||
case WM_COMPAREITEM:
|
||||
|
|
|
@ -333,7 +333,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
|||
pt.x = SLOWORD(lParam);
|
||||
pt.y = SHIWORD(lParam);
|
||||
ClientToScreen(hwnd, &pt);
|
||||
SendMessageW( hwnd, WM_CONTEXTMENU, hwnd, MAKELPARAM(pt.x, pt.y) );
|
||||
SendMessageW( hwnd, WM_CONTEXTMENU, (WPARAM)hwnd, MAKELPARAM(pt.x, pt.y) );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -651,10 +651,11 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
|||
/***********************************************************************
|
||||
* DefWindowProc (USER.107)
|
||||
*/
|
||||
LRESULT WINAPI DefWindowProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
|
||||
LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam,
|
||||
LPARAM lParam )
|
||||
{
|
||||
LRESULT result = 0;
|
||||
HWND hwnd = WIN_Handle32( hwnd16 );
|
||||
|
||||
if (!IsWindow( hwnd )) return 0;
|
||||
SPY_EnterMessage( SPY_DEFWNDPROC16, hwnd, msg, wParam, lParam );
|
||||
|
|
464
windows/dialog.c
464
windows/dialog.c
|
@ -428,11 +428,10 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
|
|||
*
|
||||
* Create the control windows for a dialog.
|
||||
*/
|
||||
static BOOL DIALOG_CreateControls( WND *pWnd, LPCSTR template,
|
||||
const DLG_TEMPLATE *dlgTemplate,
|
||||
HINSTANCE hInst, BOOL win32 )
|
||||
static BOOL DIALOG_CreateControls( HWND hwnd, LPCSTR template, const DLG_TEMPLATE *dlgTemplate,
|
||||
HINSTANCE hInst, BOOL win32 )
|
||||
{
|
||||
DIALOGINFO *dlgInfo = (DIALOGINFO *)pWnd->wExtra;
|
||||
DIALOGINFO *dlgInfo = DIALOG_get_info( hwnd );
|
||||
DLG_CONTROL_INFO info;
|
||||
HWND hwndCtrl, hwndDefButton = 0;
|
||||
INT items = dlgTemplate->nbItems;
|
||||
|
@ -445,7 +444,7 @@ static BOOL DIALOG_CreateControls( WND *pWnd, LPCSTR template,
|
|||
HINSTANCE16 instance;
|
||||
template = DIALOG_GetControl16( template, &info );
|
||||
if (HIWORD(info.className) && !strcmp( info.className, "EDIT") &&
|
||||
((pWnd->dwStyle & DS_LOCALEDIT) != DS_LOCALEDIT))
|
||||
!(GetWindowLongW( hwnd, GWL_STYLE ) & DS_LOCALEDIT))
|
||||
{
|
||||
if (!dlgInfo->hDialogHeap)
|
||||
{
|
||||
|
@ -461,15 +460,15 @@ static BOOL DIALOG_CreateControls( WND *pWnd, LPCSTR template,
|
|||
}
|
||||
else instance = (HINSTANCE16)hInst;
|
||||
|
||||
hwndCtrl = CreateWindowEx16( info.exStyle | WS_EX_NOPARENTNOTIFY,
|
||||
info.className, info.windowName,
|
||||
info.style | WS_CHILD,
|
||||
MulDiv(info.x, dlgInfo->xBaseUnit, 4),
|
||||
MulDiv(info.y, dlgInfo->yBaseUnit, 8),
|
||||
MulDiv(info.cx, dlgInfo->xBaseUnit, 4),
|
||||
MulDiv(info.cy, dlgInfo->yBaseUnit, 8),
|
||||
pWnd->hwndSelf, (HMENU16)info.id,
|
||||
instance, (LPVOID)SEGPTR_GET(info.data) );
|
||||
hwndCtrl = WIN_Handle32( CreateWindowEx16( info.exStyle | WS_EX_NOPARENTNOTIFY,
|
||||
info.className, info.windowName,
|
||||
info.style | WS_CHILD,
|
||||
MulDiv(info.x, dlgInfo->xBaseUnit, 4),
|
||||
MulDiv(info.y, dlgInfo->yBaseUnit, 8),
|
||||
MulDiv(info.cx, dlgInfo->xBaseUnit, 4),
|
||||
MulDiv(info.cy, dlgInfo->yBaseUnit, 8),
|
||||
WIN_Handle16(hwnd), (HMENU16)info.id,
|
||||
instance, (LPVOID)SEGPTR_GET(info.data) ));
|
||||
|
||||
if (info.data) SEGPTR_FREE(info.data);
|
||||
}
|
||||
|
@ -491,7 +490,7 @@ static BOOL DIALOG_CreateControls( WND *pWnd, LPCSTR template,
|
|||
MulDiv(info.y, dlgInfo->yBaseUnit, 8),
|
||||
MulDiv(info.cx, dlgInfo->xBaseUnit, 4),
|
||||
MulDiv(info.cy, dlgInfo->yBaseUnit, 8),
|
||||
pWnd->hwndSelf, (HMENU)info.id,
|
||||
hwnd, (HMENU)info.id,
|
||||
hInst, info.data );
|
||||
}
|
||||
if (!hwndCtrl) return FALSE;
|
||||
|
@ -507,7 +506,7 @@ static BOOL DIALOG_CreateControls( WND *pWnd, LPCSTR template,
|
|||
SendMessageA( hwndDefButton, BM_SETSTYLE,
|
||||
BS_PUSHBUTTON,FALSE );
|
||||
hwndDefButton = hwndCtrl;
|
||||
dlgInfo->idResult = GetWindowWord( hwndCtrl, GWW_ID );
|
||||
dlgInfo->idResult = GetWindowLongA( hwndCtrl, GWL_ID );
|
||||
}
|
||||
}
|
||||
TRACE(" END\n" );
|
||||
|
@ -703,20 +702,16 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
|
|||
* is never disabled if the dialog fails because of an invalid template)
|
||||
*/
|
||||
static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
|
||||
BOOL win32Template, HWND owner,
|
||||
DLGPROC16 dlgProc, LPARAM param,
|
||||
HWND owner, DLGPROC dlgProc, LPARAM param,
|
||||
WINDOWPROCTYPE procType, BOOL modal )
|
||||
{
|
||||
HMENU16 hMenu = 0;
|
||||
HFONT16 hFont = 0;
|
||||
HWND hwnd;
|
||||
RECT rect;
|
||||
WND * wndPtr;
|
||||
DLG_TEMPLATE template;
|
||||
DIALOGINFO * dlgInfo;
|
||||
WORD xUnit = xBaseUnit;
|
||||
WORD yUnit = yBaseUnit;
|
||||
BOOL ownerEnabled = TRUE;
|
||||
BOOL win32Template = (procType != WIN_PROC_16);
|
||||
|
||||
/* Parse dialog template */
|
||||
|
||||
|
@ -726,12 +721,24 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
|
|||
else
|
||||
dlgTemplate = DIALOG_ParseTemplate16( dlgTemplate, &template );
|
||||
|
||||
/* Initialise dialog extra data */
|
||||
|
||||
if (!(dlgInfo = HeapAlloc( GetProcessHeap(), 0, sizeof(*dlgInfo) ))) return 0;
|
||||
dlgInfo->hwndFocus = 0;
|
||||
dlgInfo->hUserFont = 0;
|
||||
dlgInfo->hMenu = 0;
|
||||
dlgInfo->xBaseUnit = xBaseUnit;
|
||||
dlgInfo->yBaseUnit = yBaseUnit;
|
||||
dlgInfo->idResult = 0;
|
||||
dlgInfo->flags = 0;
|
||||
dlgInfo->hDialogHeap = 0;
|
||||
|
||||
/* Load menu */
|
||||
|
||||
if (template.menuName)
|
||||
{
|
||||
if (!win32Template) hMenu = LoadMenu16( hInst, template.menuName );
|
||||
else hMenu = LoadMenuW( hInst, (LPCWSTR)template.menuName );
|
||||
if (!win32Template) dlgInfo->hMenu = LoadMenu16( hInst, template.menuName );
|
||||
else dlgInfo->hMenu = LoadMenuW( hInst, (LPCWSTR)template.menuName );
|
||||
}
|
||||
|
||||
/* Create custom font if needed */
|
||||
|
@ -752,38 +759,34 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
|
|||
ReleaseDC(0, dc);
|
||||
}
|
||||
if (win32Template)
|
||||
hFont = CreateFontW( -pixels, 0, 0, 0, template.weight,
|
||||
template.italic, FALSE, FALSE,
|
||||
DEFAULT_CHARSET, 0, 0,
|
||||
PROOF_QUALITY, FF_DONTCARE,
|
||||
(LPCWSTR)template.faceName );
|
||||
dlgInfo->hUserFont = CreateFontW( -pixels, 0, 0, 0, template.weight,
|
||||
template.italic, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,
|
||||
PROOF_QUALITY, FF_DONTCARE,
|
||||
(LPCWSTR)template.faceName );
|
||||
else
|
||||
hFont = CreateFontA( -pixels, 0, 0, 0, FW_DONTCARE,
|
||||
FALSE, FALSE, FALSE,
|
||||
DEFAULT_CHARSET, 0, 0,
|
||||
PROOF_QUALITY, FF_DONTCARE,
|
||||
template.faceName );
|
||||
if (hFont)
|
||||
dlgInfo->hUserFont = CreateFontA( -pixels, 0, 0, 0, FW_DONTCARE,
|
||||
FALSE, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,
|
||||
PROOF_QUALITY, FF_DONTCARE, template.faceName );
|
||||
if (dlgInfo->hUserFont)
|
||||
{
|
||||
SIZE charSize;
|
||||
if (DIALOG_GetCharSize(hFont,&charSize))
|
||||
if (DIALOG_GetCharSize( dlgInfo->hUserFont, &charSize ))
|
||||
{
|
||||
xUnit = charSize.cx;
|
||||
yUnit = charSize.cy;
|
||||
dlgInfo->xBaseUnit = charSize.cx;
|
||||
dlgInfo->yBaseUnit = charSize.cy;
|
||||
}
|
||||
}
|
||||
TRACE("units = %d,%d\n", xUnit, yUnit );
|
||||
TRACE("units = %d,%d\n", dlgInfo->xBaseUnit, dlgInfo->yBaseUnit );
|
||||
}
|
||||
|
||||
|
||||
/* Create dialog main window */
|
||||
|
||||
rect.left = rect.top = 0;
|
||||
rect.right = MulDiv(template.cx, xUnit, 4);
|
||||
rect.bottom = MulDiv(template.cy, yUnit, 8);
|
||||
rect.right = MulDiv(template.cx, dlgInfo->xBaseUnit, 4);
|
||||
rect.bottom = MulDiv(template.cy, dlgInfo->yBaseUnit, 8);
|
||||
if (template.style & DS_MODALFRAME)
|
||||
template.exStyle |= WS_EX_DLGMODALFRAME;
|
||||
AdjustWindowRectEx( &rect, template.style,
|
||||
hMenu ? TRUE : FALSE , template.exStyle );
|
||||
AdjustWindowRectEx( &rect, template.style, (dlgInfo->hMenu != 0), template.exStyle );
|
||||
rect.right -= rect.left;
|
||||
rect.bottom -= rect.top;
|
||||
|
||||
|
@ -800,8 +803,8 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
|
|||
}
|
||||
else
|
||||
{
|
||||
rect.left += MulDiv(template.x, xUnit, 4);
|
||||
rect.top += MulDiv(template.y, yUnit, 8);
|
||||
rect.left += MulDiv(template.x, dlgInfo->xBaseUnit, 4);
|
||||
rect.top += MulDiv(template.y, dlgInfo->yBaseUnit, 8);
|
||||
}
|
||||
if ( !(template.style & WS_CHILD) )
|
||||
{
|
||||
|
@ -822,50 +825,51 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
|
|||
}
|
||||
|
||||
if (modal)
|
||||
{
|
||||
ownerEnabled = DIALOG_DisableOwner( owner );
|
||||
if (ownerEnabled) dlgInfo->flags |= DF_OWNERENABLED;
|
||||
}
|
||||
|
||||
if (!win32Template)
|
||||
hwnd = CreateWindowEx16(template.exStyle, template.className,
|
||||
template.caption, template.style & ~WS_VISIBLE,
|
||||
rect.left, rect.top, rect.right, rect.bottom,
|
||||
owner, hMenu, hInst, NULL );
|
||||
hwnd = WIN_Handle32( CreateWindowEx16(template.exStyle, template.className,
|
||||
template.caption, template.style & ~WS_VISIBLE,
|
||||
rect.left, rect.top, rect.right, rect.bottom,
|
||||
WIN_Handle16(owner), dlgInfo->hMenu, hInst, NULL ));
|
||||
else
|
||||
hwnd = CreateWindowExW(template.exStyle, (LPCWSTR)template.className,
|
||||
(LPCWSTR)template.caption,
|
||||
template.style & ~WS_VISIBLE,
|
||||
rect.left, rect.top, rect.right, rect.bottom,
|
||||
owner, hMenu, hInst, NULL );
|
||||
|
||||
owner, dlgInfo->hMenu, hInst, NULL );
|
||||
|
||||
if (!hwnd)
|
||||
{
|
||||
if (hFont) DeleteObject( hFont );
|
||||
if (hMenu) DestroyMenu( hMenu );
|
||||
if (modal && ownerEnabled) DIALOG_EnableOwner(owner);
|
||||
if (dlgInfo->hUserFont) DeleteObject( dlgInfo->hUserFont );
|
||||
if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu );
|
||||
if (modal && (dlgInfo->flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner);
|
||||
HeapFree( GetProcessHeap(), 0, dlgInfo );
|
||||
return 0;
|
||||
}
|
||||
wndPtr = WIN_FindWndPtr( hwnd );
|
||||
wndPtr->flags |= WIN_ISDIALOG;
|
||||
wndPtr->helpContext = template.helpId;
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
|
||||
/* Initialise dialog extra data */
|
||||
|
||||
dlgInfo = (DIALOGINFO *)wndPtr->wExtra;
|
||||
WINPROC_SetProc( &dlgInfo->dlgProc, (WNDPROC16)dlgProc, procType, WIN_PROC_WINDOW );
|
||||
dlgInfo->hUserFont = hFont;
|
||||
dlgInfo->hMenu = hMenu;
|
||||
dlgInfo->xBaseUnit = xUnit;
|
||||
dlgInfo->yBaseUnit = yUnit;
|
||||
dlgInfo->msgResult = 0;
|
||||
dlgInfo->idResult = 0;
|
||||
dlgInfo->flags = ownerEnabled ? DF_OWNERENABLED: 0;
|
||||
dlgInfo->hDialogHeap = 0;
|
||||
if (template.helpId) SetWindowContextHelpId( hwnd, template.helpId );
|
||||
SetWindowLongW( hwnd, DWL_WINE_DIALOGINFO, (LONG)dlgInfo );
|
||||
switch(procType)
|
||||
{
|
||||
case WIN_PROC_16: SetWindowLong16( WIN_Handle16(hwnd), DWL_DLGPROC, (LONG)dlgProc ); break;
|
||||
case WIN_PROC_32A: SetWindowLongA( hwnd, DWL_DLGPROC, (LONG)dlgProc ); break;
|
||||
case WIN_PROC_32W: SetWindowLongW( hwnd, DWL_DLGPROC, (LONG)dlgProc ); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (dlgInfo->hUserFont)
|
||||
SendMessageA( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 );
|
||||
|
||||
/* Create controls */
|
||||
|
||||
if (DIALOG_CreateControls( wndPtr, dlgTemplate, &template,
|
||||
if (DIALOG_CreateControls( hwnd, dlgTemplate, &template,
|
||||
hInst, win32Template ))
|
||||
{
|
||||
HWND hwndPreInitFocus;
|
||||
|
@ -886,21 +890,20 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
|
|||
{
|
||||
/* If the dlgproc has returned FALSE (indicating handling of keyboard focus)
|
||||
but the focus has not changed, set the focus where we expect it. */
|
||||
if ( (wndPtr->dwStyle & WS_VISIBLE) && ( GetFocus() == hwndPreInitFocus ) )
|
||||
if ((GetFocus() == hwndPreInitFocus) &&
|
||||
(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
|
||||
{
|
||||
dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE);
|
||||
SetFocus( dlgInfo->hwndFocus );
|
||||
}
|
||||
}
|
||||
|
||||
if (template.style & WS_VISIBLE && !(wndPtr->dwStyle & WS_VISIBLE))
|
||||
if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
|
||||
{
|
||||
ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
|
||||
}
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
return hwnd;
|
||||
}
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
if( IsWindow(hwnd) ) DestroyWindow( hwnd );
|
||||
if (modal && ownerEnabled) DIALOG_EnableOwner(owner);
|
||||
return 0;
|
||||
|
@ -990,8 +993,8 @@ HWND16 WINAPI CreateDialogIndirectParam16( HINSTANCE16 hInst,
|
|||
HWND16 owner, DLGPROC16 dlgProc,
|
||||
LPARAM param )
|
||||
{
|
||||
return DIALOG_CreateIndirect( hInst, dlgTemplate, FALSE, owner,
|
||||
dlgProc, param, WIN_PROC_16, FALSE );
|
||||
return WIN_Handle16( DIALOG_CreateIndirect( hInst, dlgTemplate, WIN_Handle32(owner),
|
||||
(DLGPROC)dlgProc, param, WIN_PROC_16, FALSE ));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1003,8 +1006,7 @@ HWND WINAPI CreateDialogIndirectParamA( HINSTANCE hInst,
|
|||
HWND owner, DLGPROC dlgProc,
|
||||
LPARAM param )
|
||||
{
|
||||
return DIALOG_CreateIndirect( hInst, dlgTemplate, TRUE, owner,
|
||||
(DLGPROC16)dlgProc, param, WIN_PROC_32A, FALSE );
|
||||
return DIALOG_CreateIndirect( hInst, dlgTemplate, owner, dlgProc, param, WIN_PROC_32A, FALSE );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -1015,8 +1017,7 @@ HWND WINAPI CreateDialogIndirectParamAorW( HINSTANCE hInst,
|
|||
HWND owner, DLGPROC dlgProc,
|
||||
LPARAM param )
|
||||
{ FIXME("assume WIN_PROC_32W\n");
|
||||
return DIALOG_CreateIndirect( hInst, dlgTemplate, TRUE, owner,
|
||||
(DLGPROC16)dlgProc, param, WIN_PROC_32W, FALSE );
|
||||
return DIALOG_CreateIndirect( hInst, dlgTemplate, owner, dlgProc, param, WIN_PROC_32W, FALSE );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -1027,8 +1028,7 @@ HWND WINAPI CreateDialogIndirectParamW( HINSTANCE hInst,
|
|||
HWND owner, DLGPROC dlgProc,
|
||||
LPARAM param )
|
||||
{
|
||||
return DIALOG_CreateIndirect( hInst, dlgTemplate, TRUE, owner,
|
||||
(DLGPROC16)dlgProc, param, WIN_PROC_32W, FALSE );
|
||||
return DIALOG_CreateIndirect( hInst, dlgTemplate, owner, dlgProc, param, WIN_PROC_32W, FALSE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1037,21 +1037,19 @@ HWND WINAPI CreateDialogIndirectParamW( HINSTANCE hInst,
|
|||
*/
|
||||
static INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
|
||||
{
|
||||
WND * wndPtr;
|
||||
DIALOGINFO * dlgInfo;
|
||||
MSG msg;
|
||||
INT retval;
|
||||
HWND ownerMsg = GetAncestor( owner, GA_ROOT );
|
||||
|
||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return -1;
|
||||
dlgInfo = (DIALOGINFO *)wndPtr->wExtra;
|
||||
if (!(dlgInfo = DIALOG_get_info( hwnd ))) return -1;
|
||||
|
||||
if (!(dlgInfo->flags & DF_END)) /* was EndDialog called in WM_INITDIALOG ? */
|
||||
{
|
||||
ShowWindow( hwnd, SW_SHOW );
|
||||
for (;;)
|
||||
{
|
||||
if (!(wndPtr->dwStyle & DS_NOIDLEMSG))
|
||||
if (!(GetWindowLongW( hwnd, GWL_STYLE ) & DS_NOIDLEMSG))
|
||||
{
|
||||
if (!PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ))
|
||||
{
|
||||
|
@ -1064,6 +1062,7 @@ static INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
|
|||
|
||||
if (CallMsgFilterW( &msg, MSGF_DIALOGBOX )) continue;
|
||||
|
||||
if (!IsWindow( hwnd )) return -1;
|
||||
if (!(dlgInfo->flags & DF_END) && !IsDialogMessageW( hwnd, &msg))
|
||||
{
|
||||
TranslateMessage( &msg );
|
||||
|
@ -1073,8 +1072,7 @@ static INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
|
|||
}
|
||||
}
|
||||
if (dlgInfo->flags & DF_OWNERENABLED) DIALOG_EnableOwner( owner );
|
||||
retval = dlgInfo->idResult;
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
retval = dlgInfo->idResult;
|
||||
DestroyWindow( hwnd );
|
||||
return retval;
|
||||
}
|
||||
|
@ -1094,9 +1092,9 @@ INT16 WINAPI DialogBox16( HINSTANCE16 hInst, LPCSTR dlgTemplate,
|
|||
* DialogBoxParam (USER.239)
|
||||
*/
|
||||
INT16 WINAPI DialogBoxParam16( HINSTANCE16 hInst, LPCSTR template,
|
||||
HWND16 owner, DLGPROC16 dlgProc, LPARAM param )
|
||||
HWND16 owner16, DLGPROC16 dlgProc, LPARAM param )
|
||||
{
|
||||
HWND16 hwnd = 0;
|
||||
HWND hwnd = 0;
|
||||
HRSRC16 hRsrc;
|
||||
HGLOBAL16 hmem;
|
||||
LPCVOID data;
|
||||
|
@ -1104,12 +1102,14 @@ INT16 WINAPI DialogBoxParam16( HINSTANCE16 hInst, LPCSTR template,
|
|||
|
||||
if (!(hRsrc = FindResource16( hInst, template, RT_DIALOGA ))) return 0;
|
||||
if (!(hmem = LoadResource16( hInst, hRsrc ))) return 0;
|
||||
if (!(data = LockResource16( hmem ))) hwnd = 0;
|
||||
else hwnd = DIALOG_CreateIndirect( hInst, data, FALSE, owner,
|
||||
dlgProc, param, WIN_PROC_16, TRUE );
|
||||
if (hwnd)
|
||||
ret =(INT16)DIALOG_DoDialogBox( hwnd, owner );
|
||||
if (data) GlobalUnlock16( hmem );
|
||||
if ((data = LockResource16( hmem )))
|
||||
{
|
||||
HWND owner = WIN_Handle32(owner16);
|
||||
hwnd = DIALOG_CreateIndirect( hInst, data, owner,
|
||||
(DLGPROC)dlgProc, param, WIN_PROC_16, TRUE );
|
||||
if (hwnd) ret = DIALOG_DoDialogBox( hwnd, owner );
|
||||
GlobalUnlock16( hmem );
|
||||
}
|
||||
FreeResource16( hmem );
|
||||
return ret;
|
||||
}
|
||||
|
@ -1125,8 +1125,7 @@ INT WINAPI DialogBoxParamA( HINSTANCE hInst, LPCSTR name,
|
|||
HANDLE hrsrc = FindResourceA( hInst, name, RT_DIALOGA );
|
||||
if (!hrsrc) return 0;
|
||||
hwnd = DIALOG_CreateIndirect( hInst, (LPVOID)LoadResource(hInst, hrsrc),
|
||||
TRUE, owner,
|
||||
(DLGPROC16) dlgProc, param, WIN_PROC_32A, TRUE );
|
||||
owner, dlgProc, param, WIN_PROC_32A, TRUE );
|
||||
if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
|
||||
return -1;
|
||||
}
|
||||
|
@ -1142,8 +1141,7 @@ INT WINAPI DialogBoxParamW( HINSTANCE hInst, LPCWSTR name,
|
|||
HANDLE hrsrc = FindResourceW( hInst, name, RT_DIALOGW );
|
||||
if (!hrsrc) return 0;
|
||||
hwnd = DIALOG_CreateIndirect( hInst, (LPVOID)LoadResource(hInst, hrsrc),
|
||||
TRUE, owner,
|
||||
(DLGPROC16)dlgProc, param, WIN_PROC_32W, TRUE );
|
||||
owner, dlgProc, param, WIN_PROC_32W, TRUE );
|
||||
if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
|
||||
return -1;
|
||||
}
|
||||
|
@ -1164,15 +1162,15 @@ INT16 WINAPI DialogBoxIndirect16( HINSTANCE16 hInst, HANDLE16 dlgTemplate,
|
|||
* DialogBoxIndirectParam16 (USER32.@)
|
||||
*/
|
||||
INT16 WINAPI DialogBoxIndirectParam16( HINSTANCE16 hInst, HANDLE16 dlgTemplate,
|
||||
HWND16 owner, DLGPROC16 dlgProc,
|
||||
HWND16 owner16, DLGPROC16 dlgProc,
|
||||
LPARAM param )
|
||||
{
|
||||
HWND16 hwnd;
|
||||
HWND hwnd, owner = WIN_Handle32( owner16 );
|
||||
LPCVOID ptr;
|
||||
|
||||
if (!(ptr = GlobalLock16( dlgTemplate ))) return -1;
|
||||
hwnd = DIALOG_CreateIndirect( hInst, ptr, FALSE, owner,
|
||||
dlgProc, param, WIN_PROC_16, TRUE );
|
||||
hwnd = DIALOG_CreateIndirect( hInst, ptr, owner, (DLGPROC)dlgProc,
|
||||
param, WIN_PROC_16, TRUE );
|
||||
GlobalUnlock16( dlgTemplate );
|
||||
if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
|
||||
return -1;
|
||||
|
@ -1186,8 +1184,8 @@ INT WINAPI DialogBoxIndirectParamA(HINSTANCE hInstance, LPCVOID template,
|
|||
HWND owner, DLGPROC dlgProc,
|
||||
LPARAM param )
|
||||
{
|
||||
HWND hwnd = DIALOG_CreateIndirect( hInstance, template, TRUE, owner,
|
||||
(DLGPROC16) dlgProc, param, WIN_PROC_32A, TRUE );
|
||||
HWND hwnd = DIALOG_CreateIndirect( hInstance, template, owner,
|
||||
dlgProc, param, WIN_PROC_32A, TRUE );
|
||||
if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
|
||||
return -1;
|
||||
}
|
||||
|
@ -1200,8 +1198,8 @@ INT WINAPI DialogBoxIndirectParamW(HINSTANCE hInstance, LPCVOID template,
|
|||
HWND owner, DLGPROC dlgProc,
|
||||
LPARAM param )
|
||||
{
|
||||
HWND hwnd = DIALOG_CreateIndirect( hInstance, template, TRUE, owner,
|
||||
(DLGPROC16)dlgProc, param, WIN_PROC_32W, TRUE );
|
||||
HWND hwnd = DIALOG_CreateIndirect( hInstance, template, owner,
|
||||
dlgProc, param, WIN_PROC_32W, TRUE );
|
||||
if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
|
||||
return -1;
|
||||
}
|
||||
|
@ -1216,46 +1214,30 @@ INT WINAPI DialogBoxIndirectParamAorW(HINSTANCE hInstance, LPCVOID template,
|
|||
HWND hwnd;
|
||||
FIXME("0x%08x %p 0x%08x %p 0x%08lx 0x%08lx\n",
|
||||
hInstance, template, owner, dlgProc, param, x);
|
||||
hwnd = DIALOG_CreateIndirect( hInstance, template, TRUE, owner,
|
||||
(DLGPROC16)dlgProc, param, WIN_PROC_32W, TRUE );
|
||||
hwnd = DIALOG_CreateIndirect( hInstance, template, owner, dlgProc, param, WIN_PROC_32W, TRUE );
|
||||
if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
|
||||
return -1;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* EndDialog (USER.88)
|
||||
*/
|
||||
BOOL16 WINAPI EndDialog16( HWND16 hwnd, INT16 retval )
|
||||
{
|
||||
return EndDialog( hwnd, retval );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* EndDialog (USER32.@)
|
||||
*/
|
||||
BOOL WINAPI EndDialog( HWND hwnd, INT retval )
|
||||
{
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
BOOL wasEnabled = TRUE;
|
||||
DIALOGINFO * dlgInfo;
|
||||
HWND owner;
|
||||
|
||||
TRACE("%04x %d\n", hwnd, retval );
|
||||
|
||||
if (!wndPtr)
|
||||
if (!(dlgInfo = DIALOG_get_info( hwnd )))
|
||||
{
|
||||
ERR("got invalid window handle (%04x); buggy app !?\n", hwnd);
|
||||
return FALSE;
|
||||
ERR("got invalid window handle (%04x); buggy app !?\n", hwnd);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((dlgInfo = (DIALOGINFO *)wndPtr->wExtra))
|
||||
{
|
||||
dlgInfo->idResult = retval;
|
||||
dlgInfo->flags |= DF_END;
|
||||
wasEnabled = (dlgInfo->flags & DF_OWNERENABLED);
|
||||
}
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
dlgInfo->idResult = retval;
|
||||
dlgInfo->flags |= DF_END;
|
||||
wasEnabled = (dlgInfo->flags & DF_OWNERENABLED);
|
||||
|
||||
if (wasEnabled && (owner = GetWindow( hwnd, GW_OWNER )))
|
||||
DIALOG_EnableOwner( owner );
|
||||
|
@ -1314,7 +1296,7 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM vKey )
|
|||
if ((dlgCode & DLGC_STATIC) || (style & 0x0f) == BS_GROUPBOX )
|
||||
{
|
||||
/* set focus to the control */
|
||||
SendMessageA( hwndDlg, WM_NEXTDLGCTL, hwndControl, 1);
|
||||
SendMessageA( hwndDlg, WM_NEXTDLGCTL, (WPARAM)hwndControl, 1);
|
||||
/* and bump it on to next */
|
||||
SendMessageA( hwndDlg, WM_NEXTDLGCTL, 0, 0);
|
||||
}
|
||||
|
@ -1444,7 +1426,7 @@ static BOOL DIALOG_IsDialogMessage( HWND hwnd, HWND hwndDlg,
|
|||
BOOL fPrevious = (wParam == VK_LEFT || wParam == VK_UP);
|
||||
HWND hwndNext =
|
||||
GetNextDlgGroupItem (hwndDlg, GetFocus(), fPrevious );
|
||||
SendMessageA( hwndDlg, WM_NEXTDLGCTL, hwndNext, 1 );
|
||||
SendMessageA( hwndDlg, WM_NEXTDLGCTL, (WPARAM)hwndNext, 1 );
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
|
@ -1578,15 +1560,6 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDlgCtrlID (USER.277)
|
||||
*/
|
||||
INT16 WINAPI GetDlgCtrlID16( HWND16 hwnd )
|
||||
{
|
||||
return GetDlgCtrlID( hwnd );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDlgCtrlID (USER32.@)
|
||||
*/
|
||||
|
@ -1596,15 +1569,6 @@ INT WINAPI GetDlgCtrlID( HWND hwnd )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDlgItem (USER.91)
|
||||
*/
|
||||
HWND16 WINAPI GetDlgItem16( HWND16 hwndDlg, INT16 id )
|
||||
{
|
||||
return GetDlgItem( hwndDlg, id );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDlgItem (USER32.@)
|
||||
*/
|
||||
|
@ -1623,18 +1587,6 @@ HWND WINAPI GetDlgItem( HWND hwndDlg, INT id )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SendDlgItemMessage (USER.101)
|
||||
*/
|
||||
LRESULT WINAPI SendDlgItemMessage16( HWND16 hwnd, INT16 id, UINT16 msg,
|
||||
WPARAM16 wParam, LPARAM lParam )
|
||||
{
|
||||
HWND16 hwndCtrl = GetDlgItem16( hwnd, id );
|
||||
if (hwndCtrl) return SendMessage16( hwndCtrl, msg, wParam, lParam );
|
||||
else return 0;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SendDlgItemMessageA (USER32.@)
|
||||
*/
|
||||
|
@ -1659,15 +1611,6 @@ LRESULT WINAPI SendDlgItemMessageW( HWND hwnd, INT id, UINT msg,
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetDlgItemText (USER.92)
|
||||
*/
|
||||
void WINAPI SetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR lpString )
|
||||
{
|
||||
SendDlgItemMessage16( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetDlgItemTextA (USER32.@)
|
||||
*/
|
||||
|
@ -1686,16 +1629,6 @@ BOOL WINAPI SetDlgItemTextW( HWND hwnd, INT id, LPCWSTR lpString )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDlgItemText (USER.93)
|
||||
*/
|
||||
INT16 WINAPI GetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR str, UINT16 len )
|
||||
{
|
||||
return (INT16)SendDlgItemMessage16( hwnd, id, WM_GETTEXT,
|
||||
len, (LPARAM)str );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDlgItemTextA (USER32.@)
|
||||
*/
|
||||
|
@ -1716,15 +1649,6 @@ INT WINAPI GetDlgItemTextW( HWND hwnd, INT id, LPWSTR str, UINT len )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetDlgItemInt (USER.94)
|
||||
*/
|
||||
void WINAPI SetDlgItemInt16( HWND16 hwnd, INT16 id, UINT16 value, BOOL16 fSigned )
|
||||
{
|
||||
SetDlgItemInt( hwnd, (UINT)(UINT16)id, value, fSigned );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetDlgItemInt (USER32.@)
|
||||
*/
|
||||
|
@ -1740,31 +1664,6 @@ BOOL WINAPI SetDlgItemInt( HWND hwnd, INT id, UINT value,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDlgItemInt (USER.95)
|
||||
*/
|
||||
UINT16 WINAPI GetDlgItemInt16( HWND16 hwnd, INT16 id, BOOL16 *translated,
|
||||
BOOL16 fSigned )
|
||||
{
|
||||
UINT result;
|
||||
BOOL ok;
|
||||
|
||||
if (translated) *translated = FALSE;
|
||||
result = GetDlgItemInt( hwnd, (UINT)(UINT16)id, &ok, fSigned );
|
||||
if (!ok) return 0;
|
||||
if (fSigned)
|
||||
{
|
||||
if (((INT)result < -32767) || ((INT)result > 32767)) return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result > 65535) return 0;
|
||||
}
|
||||
if (translated) *translated = TRUE;
|
||||
return (UINT16)result;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDlgItemInt (USER32.@)
|
||||
*/
|
||||
|
@ -1798,16 +1697,6 @@ UINT WINAPI GetDlgItemInt( HWND hwnd, INT id, BOOL *translated,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CheckDlgButton (USER.97)
|
||||
*/
|
||||
BOOL16 WINAPI CheckDlgButton16( HWND16 hwnd, INT16 id, UINT16 check )
|
||||
{
|
||||
SendDlgItemMessageA( hwnd, id, BM_SETCHECK, check, 0 );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CheckDlgButton (USER32.@)
|
||||
*/
|
||||
|
@ -1818,15 +1707,6 @@ BOOL WINAPI CheckDlgButton( HWND hwnd, INT id, UINT check )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsDlgButtonChecked (USER.98)
|
||||
*/
|
||||
UINT16 WINAPI IsDlgButtonChecked16( HWND16 hwnd, UINT16 id )
|
||||
{
|
||||
return (UINT16)SendDlgItemMessageA( hwnd, id, BM_GETCHECK, 0, 0 );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsDlgButtonChecked (USER32.@)
|
||||
*/
|
||||
|
@ -1836,16 +1716,6 @@ UINT WINAPI IsDlgButtonChecked( HWND hwnd, UINT id )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CheckRadioButton (USER.96)
|
||||
*/
|
||||
BOOL16 WINAPI CheckRadioButton16( HWND16 hwndDlg, UINT16 firstID,
|
||||
UINT16 lastID, UINT16 checkID )
|
||||
{
|
||||
return CheckRadioButton( hwndDlg, firstID, lastID, checkID );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CheckRB
|
||||
*
|
||||
|
@ -1902,56 +1772,25 @@ DWORD WINAPI GetDialogBaseUnits(void)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MapDialogRect (USER.103)
|
||||
*/
|
||||
void WINAPI MapDialogRect16( HWND16 hwnd, LPRECT16 rect )
|
||||
{
|
||||
DIALOGINFO * dlgInfo;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
if (!wndPtr) return;
|
||||
dlgInfo = (DIALOGINFO *)wndPtr->wExtra;
|
||||
rect->left = MulDiv(rect->left, dlgInfo->xBaseUnit, 4);
|
||||
rect->right = MulDiv(rect->right, dlgInfo->xBaseUnit, 4);
|
||||
rect->top = MulDiv(rect->top, dlgInfo->yBaseUnit, 8);
|
||||
rect->bottom = MulDiv(rect->bottom, dlgInfo->yBaseUnit, 8);
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MapDialogRect (USER32.@)
|
||||
*/
|
||||
BOOL WINAPI MapDialogRect( HWND hwnd, LPRECT rect )
|
||||
{
|
||||
DIALOGINFO * dlgInfo;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
if (!wndPtr) return FALSE;
|
||||
dlgInfo = (DIALOGINFO *)wndPtr->wExtra;
|
||||
if (!(dlgInfo = DIALOG_get_info( hwnd ))) return FALSE;
|
||||
rect->left = MulDiv(rect->left, dlgInfo->xBaseUnit, 4);
|
||||
rect->right = MulDiv(rect->right, dlgInfo->xBaseUnit, 4);
|
||||
rect->top = MulDiv(rect->top, dlgInfo->yBaseUnit, 8);
|
||||
rect->bottom = MulDiv(rect->bottom, dlgInfo->yBaseUnit, 8);
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetNextDlgGroupItem (USER.227)
|
||||
*/
|
||||
HWND16 WINAPI GetNextDlgGroupItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
|
||||
BOOL16 fPrevious )
|
||||
{
|
||||
return (HWND16)GetNextDlgGroupItem( hwndDlg, hwndCtrl, fPrevious );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetNextDlgGroupItem (USER32.@)
|
||||
*/
|
||||
HWND WINAPI GetNextDlgGroupItem( HWND hwndDlg, HWND hwndCtrl,
|
||||
BOOL fPrevious )
|
||||
HWND WINAPI GetNextDlgGroupItem( HWND hwndDlg, HWND hwndCtrl, BOOL fPrevious )
|
||||
{
|
||||
HWND hwnd, retvalue;
|
||||
|
||||
|
@ -2008,15 +1847,6 @@ HWND WINAPI GetNextDlgGroupItem( HWND hwndDlg, HWND hwndCtrl,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetNextDlgTabItem (USER.228)
|
||||
*/
|
||||
HWND16 WINAPI GetNextDlgTabItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
|
||||
BOOL16 fPrevious )
|
||||
{
|
||||
return (HWND16)GetNextDlgTabItem( hwndDlg, hwndCtrl, fPrevious );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DIALOG_GetNextTabItem
|
||||
*
|
||||
|
@ -2266,33 +2096,6 @@ static INT DIALOG_DlgDirListW( HWND hDlg, LPWSTR spec, INT idLBox,
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DlgDirSelect (USER.99)
|
||||
*/
|
||||
BOOL16 WINAPI DlgDirSelect16( HWND16 hwnd, LPSTR str, INT16 id )
|
||||
{
|
||||
return DlgDirSelectEx16( hwnd, str, 128, id );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DlgDirSelectComboBox (USER.194)
|
||||
*/
|
||||
BOOL16 WINAPI DlgDirSelectComboBox16( HWND16 hwnd, LPSTR str, INT16 id )
|
||||
{
|
||||
return DlgDirSelectComboBoxEx16( hwnd, str, 128, id );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DlgDirSelectEx (USER.422)
|
||||
*/
|
||||
BOOL16 WINAPI DlgDirSelectEx16( HWND16 hwnd, LPSTR str, INT16 len, INT16 id )
|
||||
{
|
||||
return DlgDirSelectExA( hwnd, str, len, id );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DlgDirSelectExA (USER32.@)
|
||||
*/
|
||||
|
@ -2311,16 +2114,6 @@ BOOL WINAPI DlgDirSelectExW( HWND hwnd, LPWSTR str, INT len, INT id )
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DlgDirSelectComboBoxEx (USER.423)
|
||||
*/
|
||||
BOOL16 WINAPI DlgDirSelectComboBoxEx16( HWND16 hwnd, LPSTR str, INT16 len,
|
||||
INT16 id )
|
||||
{
|
||||
return DlgDirSelectComboBoxExA( hwnd, str, len, id );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DlgDirSelectComboBoxExA (USER32.@)
|
||||
*/
|
||||
|
@ -2341,21 +2134,6 @@ BOOL WINAPI DlgDirSelectComboBoxExW( HWND hwnd, LPWSTR str, INT len,
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DlgDirList (USER.100)
|
||||
*/
|
||||
INT16 WINAPI DlgDirList16( HWND16 hDlg, LPSTR spec, INT16 idLBox,
|
||||
INT16 idStatic, UINT16 attrib )
|
||||
{
|
||||
/* according to Win16 docs, DDL_DRIVES should make DDL_EXCLUSIVE
|
||||
* be set automatically (this is different in Win32, and
|
||||
* DIALOG_DlgDirList sends Win32 messages to the control,
|
||||
* so do it here) */
|
||||
if (attrib & DDL_DRIVES) attrib |= DDL_EXCLUSIVE;
|
||||
return DIALOG_DlgDirList( hDlg, spec, idLBox, idStatic, attrib, FALSE );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DlgDirListA (USER32.@)
|
||||
*/
|
||||
|
@ -2376,16 +2154,6 @@ INT WINAPI DlgDirListW( HWND hDlg, LPWSTR spec, INT idLBox,
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DlgDirListComboBox (USER.195)
|
||||
*/
|
||||
INT16 WINAPI DlgDirListComboBox16( HWND16 hDlg, LPSTR spec, INT16 idCBox,
|
||||
INT16 idStatic, UINT16 attrib )
|
||||
{
|
||||
return DIALOG_DlgDirList( hDlg, spec, idCBox, idStatic, attrib, TRUE );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DlgDirListComboBoxA (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -29,7 +29,7 @@ void FOCUS_SwitchFocus( MESSAGEQUEUE *pMsgQ, HWND hFocusFrom, HWND hFocusTo )
|
|||
{
|
||||
PERQDATA_SetFocusWnd( pMsgQ->pQData, hFocusTo );
|
||||
|
||||
if (hFocusFrom) SendMessageA( hFocusFrom, WM_KILLFOCUS, hFocusTo, 0 );
|
||||
if (hFocusFrom) SendMessageA( hFocusFrom, WM_KILLFOCUS, (WPARAM)hFocusTo, 0 );
|
||||
|
||||
if( !hFocusTo || hFocusTo != PERQDATA_GetFocusWnd( pMsgQ->pQData ) )
|
||||
{
|
||||
|
@ -40,16 +40,7 @@ void FOCUS_SwitchFocus( MESSAGEQUEUE *pMsgQ, HWND hFocusFrom, HWND hFocusTo )
|
|||
has received the keyboard focus. */
|
||||
if (USER_Driver.pSetFocus) USER_Driver.pSetFocus(hFocusTo);
|
||||
|
||||
SendMessageA( hFocusTo, WM_SETFOCUS, hFocusFrom, 0 );
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* SetFocus (USER.22)
|
||||
*/
|
||||
HWND16 WINAPI SetFocus16( HWND16 hwnd )
|
||||
{
|
||||
return (HWND16)SetFocus( hwnd );
|
||||
SendMessageA( hFocusTo, WM_SETFOCUS, (WPARAM)hFocusFrom, 0 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -156,15 +147,6 @@ CLEANUP:
|
|||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* GetFocus (USER.23)
|
||||
*/
|
||||
HWND16 WINAPI GetFocus16(void)
|
||||
{
|
||||
return (HWND16)GetFocus();
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* GetFocus (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -99,13 +99,13 @@ static void HOOK_Map16To32Common(INT id, INT code, WPARAM *pwParam,
|
|||
LPCWPSTRUCT16 lpcwp16 = MapSL(*plParam);
|
||||
LPCWPSTRUCT lpcwp32 = HeapAlloc( GetProcessHeap(), 0, sizeof(*lpcwp32) );
|
||||
|
||||
lpcwp32->hwnd = lpcwp16->hwnd;
|
||||
lpcwp32->hwnd = WIN_Handle32(lpcwp16->hwnd);
|
||||
lpcwp32->lParam = lpcwp16->lParam;
|
||||
|
||||
if (bA) WINPROC_MapMsg16To32A( lpcwp16->message, lpcwp16->wParam,
|
||||
if (bA) WINPROC_MapMsg16To32A( lpcwp32->hwnd, lpcwp16->message, lpcwp16->wParam,
|
||||
&lpcwp32->message, &lpcwp32->wParam,
|
||||
&lpcwp32->lParam );
|
||||
else WINPROC_MapMsg16To32W( lpcwp16->hwnd,lpcwp16->message, lpcwp16->wParam,
|
||||
else WINPROC_MapMsg16To32W( lpcwp32->hwnd,lpcwp16->message, lpcwp16->wParam,
|
||||
&lpcwp32->message, &lpcwp32->wParam,
|
||||
&lpcwp32->lParam );
|
||||
*plParam = (LPARAM)lpcwp32;
|
||||
|
@ -143,7 +143,7 @@ static void HOOK_Map16To32Common(INT id, INT code, WPARAM *pwParam,
|
|||
else
|
||||
lpcbtcw32->lpcs->lpszClass = (LPCSTR)lpcs16->lpszClass;
|
||||
|
||||
lpcbtcw32->hwndInsertAfter = lpcbtcw16->hwndInsertAfter;
|
||||
lpcbtcw32->hwndInsertAfter = WIN_Handle32( lpcbtcw16->hwndInsertAfter );
|
||||
|
||||
*plParam = (LPARAM)lpcbtcw32;
|
||||
break;
|
||||
|
@ -154,7 +154,7 @@ static void HOOK_Map16To32Common(INT id, INT code, WPARAM *pwParam,
|
|||
LPCBTACTIVATESTRUCT lpcas32 = HeapAlloc( GetProcessHeap(), 0,
|
||||
sizeof(*lpcas32) );
|
||||
lpcas32->fMouse = lpcas16->fMouse;
|
||||
lpcas32->hWndActive = lpcas16->hWndActive;
|
||||
lpcas32->hWndActive = WIN_Handle32(lpcas16->hWndActive);
|
||||
*plParam = (LPARAM)lpcas32;
|
||||
break;
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ static void HOOK_Map16To32Common(INT id, INT code, WPARAM *pwParam,
|
|||
lpms32->wHitTestCode = (INT)((INT16)lpms16->wHitTestCode);
|
||||
|
||||
lpms32->dwExtraInfo = lpms16->dwExtraInfo;
|
||||
lpms32->hwnd = lpms16->hwnd;
|
||||
lpms32->hwnd = WIN_Handle32( lpms16->hwnd );
|
||||
*plParam = (LPARAM)lpms32;
|
||||
break;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ static void HOOK_Map16To32Common(INT id, INT code, WPARAM *pwParam,
|
|||
correct sign extension. Yay. :| */
|
||||
lpms32->wHitTestCode = (INT)((INT16)lpms16->wHitTestCode);
|
||||
lpms32->dwExtraInfo = lpms16->dwExtraInfo;
|
||||
lpms32->hwnd = lpms16->hwnd;
|
||||
lpms32->hwnd = WIN_Handle32(lpms16->hwnd);
|
||||
*plParam = (LPARAM)lpms32;
|
||||
break;
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ static void HOOK_UnMap16To32Common(INT id, INT code, WPARAM wParamOrig,
|
|||
HeapFree( GetProcessHeap(), 0, (LPWSTR)lpcbtcw32->lpcs->lpszClass );
|
||||
}
|
||||
|
||||
lpcbtcw16->hwndInsertAfter = lpcbtcw32->hwndInsertAfter;
|
||||
lpcbtcw16->hwndInsertAfter = WIN_Handle16( lpcbtcw32->hwndInsertAfter );
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, lpcbtcw32->lpcs );
|
||||
} /* fall through */
|
||||
|
@ -406,7 +406,7 @@ static void HOOK_Map32To16Common(INT id, INT code, WPARAM *pwParam,
|
|||
LPCWPSTRUCT lpcwp32 = (LPCWPSTRUCT)*plParam;
|
||||
LPCWPSTRUCT16 lpcwp16 = SEGPTR_NEW( CWPSTRUCT16 );
|
||||
|
||||
lpcwp16->hwnd = lpcwp32->hwnd;
|
||||
lpcwp16->hwnd = WIN_Handle16(lpcwp32->hwnd);
|
||||
lpcwp16->lParam = lpcwp32->lParam;
|
||||
|
||||
if (bA) WINPROC_MapMsg32ATo16( lpcwp32->hwnd, lpcwp32->message,
|
||||
|
@ -428,7 +428,7 @@ static void HOOK_Map32To16Common(INT id, INT code, WPARAM *pwParam,
|
|||
LPCBTACTIVATESTRUCT16 lpcas16 =SEGPTR_NEW( CBTACTIVATESTRUCT16 );
|
||||
|
||||
lpcas16->fMouse = lpcas32->fMouse;
|
||||
lpcas16->hWndActive = lpcas32->hWndActive;
|
||||
lpcas16->hWndActive = WIN_Handle16( lpcas32->hWndActive );
|
||||
|
||||
*plParam = (LPARAM)SEGPTR_GET( lpcas16 );
|
||||
break;
|
||||
|
@ -441,7 +441,7 @@ static void HOOK_Map32To16Common(INT id, INT code, WPARAM *pwParam,
|
|||
|
||||
CONV_POINT32TO16( &lpms32->pt, &lpms16->pt );
|
||||
|
||||
lpms16->hwnd = lpms32->hwnd;
|
||||
lpms16->hwnd = WIN_Handle16( lpms32->hwnd );
|
||||
lpms16->wHitTestCode = lpms32->wHitTestCode;
|
||||
lpms16->dwExtraInfo = lpms32->dwExtraInfo;
|
||||
|
||||
|
@ -469,7 +469,7 @@ static void HOOK_Map32To16Common(INT id, INT code, WPARAM *pwParam,
|
|||
|
||||
CONV_POINT32TO16( &lpms32->pt, &lpms16->pt );
|
||||
|
||||
lpms16->hwnd = lpms32->hwnd;
|
||||
lpms16->hwnd = WIN_Handle16( lpms32->hwnd );
|
||||
lpms16->wHitTestCode = lpms32->wHitTestCode;
|
||||
lpms16->dwExtraInfo = lpms32->dwExtraInfo;
|
||||
|
||||
|
@ -531,7 +531,7 @@ static void HOOK_Map32ATo16(INT id, INT code, WPARAM *pwParam,
|
|||
else
|
||||
lpcs16->lpszClass = (SEGPTR)lpcbtcw32->lpcs->lpszClass;
|
||||
|
||||
lpcbtcw16->hwndInsertAfter = lpcbtcw32->hwndInsertAfter;
|
||||
lpcbtcw16->hwndInsertAfter = WIN_Handle16( lpcbtcw32->hwndInsertAfter );
|
||||
|
||||
*plParam = (LPARAM)SEGPTR_GET( lpcbtcw16 );
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ static void HOOK_Map32WTo16(INT id, INT code, WPARAM *pwParam,
|
|||
cls = SEGPTR_STRDUP_WtoA( lpcbtcw32->lpcs->lpszClass );
|
||||
lpcs16->lpszName = SEGPTR_GET( name );
|
||||
lpcs16->lpszClass = SEGPTR_GET( cls );
|
||||
lpcbtcw16->hwndInsertAfter = lpcbtcw32->hwndInsertAfter;
|
||||
lpcbtcw16->hwndInsertAfter = WIN_Handle16( lpcbtcw32->hwndInsertAfter );
|
||||
|
||||
*plParam = (LPARAM)SEGPTR_GET( lpcbtcw16 );
|
||||
}
|
||||
|
@ -628,7 +628,7 @@ static void HOOK_UnMap32To16Common(INT id, INT code, WPARAM wParamOrig,
|
|||
if (HIWORD(lpcs16->lpszClass))
|
||||
SEGPTR_FREE( MapSL(lpcs16->lpszClass) );
|
||||
|
||||
lpcbtcw32->hwndInsertAfter = lpcbtcw16->hwndInsertAfter;
|
||||
lpcbtcw32->hwndInsertAfter = WIN_Handle32( lpcbtcw16->hwndInsertAfter );
|
||||
|
||||
SEGPTR_FREE( lpcs16 );
|
||||
} /* fall through */
|
||||
|
@ -1372,24 +1372,23 @@ BOOL16 WINAPI CallMsgFilter32_16( SEGPTR msg16_32, INT16 code, BOOL16 wHaveParam
|
|||
MSG msg32;
|
||||
BOOL16 ret;
|
||||
|
||||
msg32.hwnd = lpmsg16_32->msg.hwnd;
|
||||
msg32.message = lpmsg16_32->msg.message;
|
||||
msg32.wParam =
|
||||
MAKELONG(lpmsg16_32->msg.wParam, lpmsg16_32->wParamHigh);
|
||||
msg32.lParam = lpmsg16_32->msg.lParam;
|
||||
msg32.time = lpmsg16_32->msg.time;
|
||||
msg32.pt.x = (INT)lpmsg16_32->msg.pt.x;
|
||||
msg32.pt.y = (INT)lpmsg16_32->msg.pt.y;
|
||||
|
||||
msg32.hwnd = WIN_Handle32( lpmsg16_32->msg.hwnd );
|
||||
msg32.message = lpmsg16_32->msg.message;
|
||||
msg32.wParam = MAKELONG(lpmsg16_32->msg.wParam, lpmsg16_32->wParamHigh);
|
||||
msg32.lParam = lpmsg16_32->msg.lParam;
|
||||
msg32.time = lpmsg16_32->msg.time;
|
||||
msg32.pt.x = lpmsg16_32->msg.pt.x;
|
||||
msg32.pt.y = lpmsg16_32->msg.pt.y;
|
||||
|
||||
ret = (BOOL16)CallMsgFilterA(&msg32, (INT)code);
|
||||
|
||||
lpmsg16_32->msg.hwnd = msg32.hwnd;
|
||||
lpmsg16_32->msg.hwnd = WIN_Handle16( msg32.hwnd );
|
||||
lpmsg16_32->msg.message = msg32.message;
|
||||
lpmsg16_32->msg.wParam = LOWORD(msg32.wParam);
|
||||
lpmsg16_32->msg.lParam = msg32.lParam;
|
||||
lpmsg16_32->msg.time = msg32.time;
|
||||
lpmsg16_32->msg.pt.x = (INT16)msg32.pt.x;
|
||||
lpmsg16_32->msg.pt.y = (INT16)msg32.pt.y;
|
||||
lpmsg16_32->msg.pt.x = msg32.pt.x;
|
||||
lpmsg16_32->msg.pt.y = msg32.pt.y;
|
||||
lpmsg16_32->wParamHigh = HIWORD(msg32.wParam);
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -351,7 +351,7 @@ void WINAPI mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
|
|||
InputKeyStateTable[VK_CONTROL] = (keyState & MK_CONTROL ? 0x80 : 0);
|
||||
}
|
||||
input.u.mi.time = wme->time;
|
||||
input.u.mi.dwExtraInfo = wme->hWnd;
|
||||
input.u.mi.dwExtraInfo = (ULONG_PTR)wme->hWnd;
|
||||
queue_mouse_event( &input.u.mi, keyState );
|
||||
}
|
||||
else
|
||||
|
@ -526,7 +526,7 @@ HWND EVENT_Capture(HWND hwnd, INT16 ht)
|
|||
}
|
||||
|
||||
PERQDATA_SetCaptureWnd( captureWnd, captureHT );
|
||||
if (capturePrev) SendMessageA( capturePrev, WM_CAPTURECHANGED, 0, hwnd );
|
||||
if (capturePrev) SendMessageA( capturePrev, WM_CAPTURECHANGED, 0, (LPARAM)hwnd );
|
||||
}
|
||||
|
||||
CLEANUP:
|
||||
|
@ -539,15 +539,6 @@ CLEANUP:
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* SetCapture (USER.18)
|
||||
*/
|
||||
HWND16 WINAPI SetCapture16( HWND16 hwnd )
|
||||
{
|
||||
return (HWND16)EVENT_Capture( hwnd, HTCLIENT );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* SetCapture (USER32.@)
|
||||
*/
|
||||
|
@ -558,7 +549,6 @@ HWND WINAPI SetCapture( HWND hwnd )
|
|||
|
||||
|
||||
/**********************************************************************
|
||||
* ReleaseCapture (USER.19)
|
||||
* ReleaseCapture (USER32.@)
|
||||
*/
|
||||
BOOL WINAPI ReleaseCapture(void)
|
||||
|
@ -567,14 +557,6 @@ BOOL WINAPI ReleaseCapture(void)
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetCapture (USER.236)
|
||||
*/
|
||||
HWND16 WINAPI GetCapture16(void)
|
||||
{
|
||||
return (HWND16)GetCapture();
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* GetCapture (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -550,10 +550,10 @@ static HWND MDICreateChild( HWND parent, MDICLIENTINFO *ci,
|
|||
cs16->szTitle = SEGPTR_GET(title);
|
||||
cs16->szClass = SEGPTR_GET(cls);
|
||||
|
||||
hwnd = CreateWindow16( cs->szClass, cs->szTitle, style,
|
||||
cs16->x, cs16->y, cs16->cx, cs16->cy, parent,
|
||||
(HMENU)wIDmenu, cs16->hOwner,
|
||||
(LPVOID)SEGPTR_GET(cs16) );
|
||||
hwnd = WIN_Handle32( CreateWindow16( cs->szClass, cs->szTitle, style,
|
||||
cs16->x, cs16->y, cs16->cx, cs16->cy,
|
||||
WIN_Handle16(parent), (HMENU)wIDmenu,
|
||||
cs16->hOwner, (LPVOID)SEGPTR_GET(cs16) ));
|
||||
SEGPTR_FREE( title );
|
||||
SEGPTR_FREE( cls );
|
||||
SEGPTR_FREE( cs16 );
|
||||
|
@ -1287,16 +1287,16 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
|
|||
return MDICascade(hwnd, ci);
|
||||
|
||||
case WM_MDICREATE:
|
||||
if (lParam) return MDICreateChild( hwnd, ci,
|
||||
(MDICREATESTRUCTA *)lParam, unicode );
|
||||
else return 0;
|
||||
if (lParam)
|
||||
return (LRESULT)MDICreateChild( hwnd, ci, (MDICREATESTRUCTA *)lParam, unicode );
|
||||
return 0;
|
||||
|
||||
case WM_MDIDESTROY:
|
||||
return MDIDestroyChild( hwnd, ci, WIN_GetFullHandle( (HWND)wParam ), TRUE );
|
||||
|
||||
case WM_MDIGETACTIVE:
|
||||
if (lParam) *(BOOL *)lParam = (ci->hwndChildMaximized != 0);
|
||||
return ci->hwndActiveChild;
|
||||
return (LRESULT)ci->hwndActiveChild;
|
||||
|
||||
case WM_MDIICONARRANGE:
|
||||
ci->mdiFlags |= MDIF_NEEDUPDATE;
|
||||
|
@ -1423,19 +1423,21 @@ LRESULT WINAPI DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient,
|
|||
switch (message)
|
||||
{
|
||||
case WM_SETTEXT:
|
||||
return DefFrameProcA( hwnd, hwndMDIClient, message, wParam, (LPARAM)MapSL(lParam) );
|
||||
|
||||
lParam = (LPARAM)MapSL(lParam);
|
||||
/* fall through */
|
||||
case WM_COMMAND:
|
||||
case WM_NCACTIVATE:
|
||||
case WM_SETFOCUS:
|
||||
case WM_SIZE:
|
||||
return DefFrameProcW( hwnd, hwndMDIClient, message, wParam, lParam );
|
||||
return DefFrameProcA( WIN_Handle32(hwnd), WIN_Handle32(hwndMDIClient),
|
||||
message, wParam, lParam );
|
||||
|
||||
case WM_NEXTMENU:
|
||||
{
|
||||
MDINEXTMENU next_menu;
|
||||
DefFrameProcW( hwnd, hwndMDIClient, message, wParam, (LPARAM)&next_menu );
|
||||
return MAKELONG( next_menu.hmenuNext, next_menu.hwndNext );
|
||||
DefFrameProcW( WIN_Handle32(hwnd), WIN_Handle32(hwndMDIClient),
|
||||
message, wParam, (LPARAM)&next_menu );
|
||||
return MAKELONG( next_menu.hmenuNext, WIN_Handle16(next_menu.hwndNext) );
|
||||
}
|
||||
default:
|
||||
return DefWindowProc16(hwnd, message, wParam, lParam);
|
||||
|
@ -1600,7 +1602,7 @@ LRESULT WINAPI DefMDIChildProc16( HWND16 hwnd, UINT16 message,
|
|||
{
|
||||
MDINEXTMENU next_menu;
|
||||
DefMDIChildProcW( WIN_Handle32(hwnd), message, wParam, (LPARAM)&next_menu );
|
||||
return MAKELONG( next_menu.hmenuNext, next_menu.hwndNext );
|
||||
return MAKELONG( next_menu.hmenuNext, WIN_Handle16(next_menu.hwndNext) );
|
||||
}
|
||||
default:
|
||||
return DefWindowProc16(hwnd, message, wParam, lParam);
|
||||
|
@ -1874,24 +1876,6 @@ HWND WINAPI CreateMDIWindowW(
|
|||
return MDICreateChild(hWndParent, pCi, (MDICREATESTRUCTA *)&cs, TRUE);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* TranslateMDISysAccel (USER.451)
|
||||
*/
|
||||
BOOL16 WINAPI TranslateMDISysAccel16( HWND16 hwndClient, LPMSG16 msg )
|
||||
{
|
||||
if (msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN)
|
||||
{
|
||||
MSG msg32;
|
||||
msg32.hwnd = msg->hwnd;
|
||||
msg32.message = msg->message;
|
||||
msg32.wParam = msg->wParam;
|
||||
msg32.lParam = msg->lParam;
|
||||
/* MDICLIENTINFO is still the same for win32 and win16 ... */
|
||||
return TranslateMDISysAccel(hwndClient, &msg32);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* TranslateMDISysAccel (USER32.@)
|
||||
*/
|
||||
|
@ -1929,14 +1913,6 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
|
|||
return 0; /* failure */
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CalcChildScroll (USER.462)
|
||||
*/
|
||||
void WINAPI CalcChildScroll16( HWND16 hwnd, WORD scroll )
|
||||
{
|
||||
return CalcChildScroll( hwnd, scroll );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CalcChildScroll (USER32.@)
|
||||
*/
|
||||
|
@ -1997,15 +1973,6 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ScrollChildren (USER.463)
|
||||
*/
|
||||
void WINAPI ScrollChildren16(HWND16 hWnd, UINT16 uMsg, WPARAM16 wParam, LPARAM lParam)
|
||||
{
|
||||
ScrollChildren( hWnd, uMsg, wParam, lParam );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ScrollChildren (USER32.@)
|
||||
*/
|
||||
|
@ -2196,9 +2163,8 @@ static BOOL WINAPI MDI_MoreWindowsDlgProc (HWND hDlg, UINT iMsg, WPARAM wParam,
|
|||
*/
|
||||
HWND hListBox = GetDlgItem(hDlg, MDI_IDC_LISTBOX);
|
||||
UINT index = SendMessageW(hListBox, LB_GETCURSEL, 0, 0);
|
||||
HWND hwnd = SendMessageW(hListBox, LB_GETITEMDATA, index, 0);
|
||||
|
||||
EndDialog(hDlg, hwnd);
|
||||
LRESULT res = SendMessageW(hListBox, LB_GETITEMDATA, index, 0);
|
||||
EndDialog(hDlg, res);
|
||||
return TRUE;
|
||||
}
|
||||
case IDCANCEL:
|
||||
|
|
|
@ -264,16 +264,6 @@ static LRESULT CALLBACK MSGBOX_DlgProc( HWND hwnd, UINT message,
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* MessageBox (USER.1)
|
||||
*/
|
||||
INT16 WINAPI MessageBox16( HWND16 hwnd, LPCSTR text, LPCSTR title, UINT16 type)
|
||||
{
|
||||
WARN("Messagebox\n");
|
||||
return MessageBoxA( hwnd, text, title, type );
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* MessageBoxA (USER32.@)
|
||||
*
|
||||
|
@ -346,38 +336,6 @@ INT WINAPI MessageBoxExW( HWND hWnd, LPCWSTR text, LPCWSTR title,
|
|||
return MessageBoxW(hWnd,text,title,type);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* MessageBoxIndirect (USER.827)
|
||||
*/
|
||||
INT16 WINAPI MessageBoxIndirect16( LPMSGBOXPARAMS16 msgbox )
|
||||
{
|
||||
LPVOID template;
|
||||
HRSRC hRes;
|
||||
MSGBOXPARAMSA msgbox32;
|
||||
|
||||
WARN("Messagebox\n");
|
||||
|
||||
if(!(hRes = FindResourceA(GetModuleHandleA("USER32"), "MSGBOX", RT_DIALOGA)))
|
||||
return 0;
|
||||
if(!(template = (LPVOID)LoadResource(GetModuleHandleA("USER32"), hRes)))
|
||||
return 0;
|
||||
|
||||
msgbox32.cbSize = msgbox->cbSize;
|
||||
msgbox32.hwndOwner = msgbox->hwndOwner;
|
||||
msgbox32.hInstance = msgbox->hInstance;
|
||||
msgbox32.lpszText = MapSL(msgbox->lpszText);
|
||||
msgbox32.lpszCaption = MapSL(msgbox->lpszCaption);
|
||||
msgbox32.dwStyle = msgbox->dwStyle;
|
||||
msgbox32.lpszIcon = MapSL(msgbox->lpszIcon);
|
||||
msgbox32.dwContextHelpId = msgbox->dwContextHelpId;
|
||||
msgbox32.lpfnMsgBoxCallback = msgbox->lpfnMsgBoxCallback;
|
||||
msgbox32.dwLanguageId = msgbox->dwLanguageId;
|
||||
|
||||
return DialogBoxIndirectParamA( msgbox32.hInstance, template,
|
||||
msgbox32.hwndOwner, (DLGPROC)MSGBOX_DlgProc,
|
||||
(LPARAM)&msgbox32 );
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* MessageBoxIndirectA (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -236,33 +236,6 @@ static HICON NC_IconForWindow( HWND hwnd )
|
|||
return hIcon;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DrawCaption (USER.660) Draws a caption bar
|
||||
*
|
||||
* PARAMS
|
||||
* hwnd [I]
|
||||
* hdc [I]
|
||||
* lpRect [I]
|
||||
* uFlags [I]
|
||||
*
|
||||
* RETURNS
|
||||
* Success:
|
||||
* Failure:
|
||||
*/
|
||||
|
||||
BOOL16 WINAPI
|
||||
DrawCaption16 (HWND16 hwnd, HDC16 hdc, const RECT16 *rect, UINT16 uFlags)
|
||||
{
|
||||
RECT rect32;
|
||||
|
||||
if (rect)
|
||||
CONV_RECT16TO32 (rect, &rect32);
|
||||
|
||||
return (BOOL16)DrawCaptionTempA (hwnd, hdc, rect ? &rect32 : NULL,
|
||||
0, 0, NULL, uFlags & 0x1F);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DrawCaption (USER32.@) Draws a caption bar
|
||||
*
|
||||
|
@ -284,30 +257,6 @@ DrawCaption (HWND hwnd, HDC hdc, const RECT *lpRect, UINT uFlags)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DrawCaptionTemp (USER.657)
|
||||
*
|
||||
* PARAMS
|
||||
*
|
||||
* RETURNS
|
||||
* Success:
|
||||
* Failure:
|
||||
*/
|
||||
|
||||
BOOL16 WINAPI
|
||||
DrawCaptionTemp16 (HWND16 hwnd, HDC16 hdc, const RECT16 *rect, HFONT16 hFont,
|
||||
HICON16 hIcon, LPCSTR str, UINT16 uFlags)
|
||||
{
|
||||
RECT rect32;
|
||||
|
||||
if (rect)
|
||||
CONV_RECT16TO32(rect,&rect32);
|
||||
|
||||
return (BOOL16)DrawCaptionTempA (hwnd, hdc, rect?&rect32:NULL, hFont,
|
||||
hIcon, str, uFlags & 0x1F);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DrawCaptionTempA (USER32.@)
|
||||
*
|
||||
|
|
|
@ -42,9 +42,6 @@ DECLARE_DEBUG_CHANNEL(nonclient);
|
|||
/* Last COLOR id */
|
||||
#define COLOR_MAX COLOR_GRADIENTINACTIVECAPTION
|
||||
|
||||
/* Last CTLCOLOR id */
|
||||
#define CTLCOLOR_MAX CTLCOLOR_STATIC
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* add_paint_count
|
||||
|
@ -284,11 +281,11 @@ copyrgn:
|
|||
/***********************************************************************
|
||||
* BeginPaint (USER.39)
|
||||
*/
|
||||
HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
|
||||
HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
|
||||
BeginPaint( hwnd, &ps );
|
||||
BeginPaint( WIN_Handle32(hwnd), &ps );
|
||||
lps->hdc = ps.hdc;
|
||||
lps->fErase = ps.fErase;
|
||||
lps->rcPaint.top = ps.rcPaint.top;
|
||||
|
@ -401,7 +398,7 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
|
|||
BOOL16 WINAPI EndPaint16( HWND16 hwnd, const PAINTSTRUCT16* lps )
|
||||
{
|
||||
ReleaseDC16( hwnd, lps->hdc );
|
||||
ShowCaret( hwnd );
|
||||
ShowCaret16( hwnd );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -417,66 +414,6 @@ BOOL WINAPI EndPaint( HWND hwnd, const PAINTSTRUCT *lps )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* FillWindow (USER.324)
|
||||
*/
|
||||
void WINAPI FillWindow16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc, HBRUSH16 hbrush )
|
||||
{
|
||||
RECT rect;
|
||||
RECT16 rc16;
|
||||
GetClientRect( hwnd, &rect );
|
||||
DPtoLP( hdc, (LPPOINT)&rect, 2 );
|
||||
CONV_RECT32TO16( &rect, &rc16 );
|
||||
PaintRect16( hwndParent, hwnd, hdc, hbrush, &rc16 );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PAINT_GetControlBrush
|
||||
*/
|
||||
static HBRUSH16 PAINT_GetControlBrush( HWND hParent, HWND hWnd, HDC16 hDC, UINT16 ctlType )
|
||||
{
|
||||
HBRUSH16 bkgBrush = (HBRUSH16)SendMessageA( hParent, WM_CTLCOLORMSGBOX + ctlType,
|
||||
(WPARAM)hDC, (LPARAM)hWnd );
|
||||
if( !IsGDIObject16(bkgBrush) )
|
||||
bkgBrush = DEFWND_ControlColor( hDC, ctlType );
|
||||
return bkgBrush;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PaintRect (USER.325)
|
||||
*/
|
||||
void WINAPI PaintRect16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc,
|
||||
HBRUSH16 hbrush, const RECT16 *rect)
|
||||
{
|
||||
if( hbrush <= CTLCOLOR_MAX )
|
||||
{
|
||||
if( hwndParent )
|
||||
hbrush = PAINT_GetControlBrush( hwndParent, hwnd, hdc, (UINT16)hbrush );
|
||||
else
|
||||
return;
|
||||
}
|
||||
if( hbrush )
|
||||
FillRect16( hdc, rect, hbrush );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetControlBrush (USER.326)
|
||||
*/
|
||||
HBRUSH16 WINAPI GetControlBrush16( HWND16 hwnd, HDC16 hdc, UINT16 ctlType )
|
||||
{
|
||||
if (ctlType <= CTLCOLOR_MAX)
|
||||
{
|
||||
HWND16 parent = GetParent16( hwnd );
|
||||
if (!parent) parent = hwnd;
|
||||
return PAINT_GetControlBrush( parent, hwnd, hdc, ctlType );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RDW_ValidateParent [RDW_UpdateRgns() helper]
|
||||
*
|
||||
|
@ -974,30 +911,6 @@ END:
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RedrawWindow (USER.290)
|
||||
*/
|
||||
BOOL16 WINAPI RedrawWindow16( HWND16 hwnd, const RECT16 *rectUpdate,
|
||||
HRGN16 hrgnUpdate, UINT16 flags )
|
||||
{
|
||||
if (rectUpdate)
|
||||
{
|
||||
RECT r;
|
||||
CONV_RECT16TO32( rectUpdate, &r );
|
||||
return (BOOL16)RedrawWindow( (HWND)hwnd, &r, hrgnUpdate, flags );
|
||||
}
|
||||
return RedrawWindow( hwnd, NULL, hrgnUpdate, flags );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* UpdateWindow (USER.124)
|
||||
*/
|
||||
void WINAPI UpdateWindow16( HWND16 hwnd )
|
||||
{
|
||||
RedrawWindow( hwnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* UpdateWindow (USER32.@)
|
||||
*/
|
||||
|
@ -1006,14 +919,6 @@ void WINAPI UpdateWindow( HWND hwnd )
|
|||
RedrawWindow( hwnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* InvalidateRgn (USER.126)
|
||||
*/
|
||||
void WINAPI InvalidateRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 erase )
|
||||
{
|
||||
RedrawWindow((HWND)hwnd, NULL, (HRGN)hrgn, RDW_INVALIDATE | (erase ? RDW_ERASE : 0) );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* InvalidateRgn (USER32.@)
|
||||
|
@ -1024,15 +929,6 @@ BOOL WINAPI InvalidateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* InvalidateRect (USER.125)
|
||||
*/
|
||||
void WINAPI InvalidateRect16( HWND16 hwnd, const RECT16 *rect, BOOL16 erase )
|
||||
{
|
||||
RedrawWindow16( hwnd, rect, 0, RDW_INVALIDATE | (erase ? RDW_ERASE : 0) );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* InvalidateRect (USER32.@)
|
||||
*/
|
||||
|
@ -1042,15 +938,6 @@ BOOL WINAPI InvalidateRect( HWND hwnd, const RECT *rect, BOOL erase )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ValidateRgn (USER.128)
|
||||
*/
|
||||
void WINAPI ValidateRgn16( HWND16 hwnd, HRGN16 hrgn )
|
||||
{
|
||||
RedrawWindow( (HWND)hwnd, NULL, (HRGN)hrgn, RDW_VALIDATE | RDW_NOCHILDREN );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ValidateRgn (USER32.@)
|
||||
*/
|
||||
|
@ -1060,15 +947,6 @@ void WINAPI ValidateRgn( HWND hwnd, HRGN hrgn )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ValidateRect (USER.127)
|
||||
*/
|
||||
void WINAPI ValidateRect16( HWND16 hwnd, const RECT16 *rect )
|
||||
{
|
||||
RedrawWindow16( hwnd, rect, 0, RDW_VALIDATE | RDW_NOCHILDREN );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ValidateRect (USER32.@)
|
||||
*/
|
||||
|
@ -1078,21 +956,6 @@ void WINAPI ValidateRect( HWND hwnd, const RECT *rect )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetUpdateRect (USER.190)
|
||||
*/
|
||||
BOOL16 WINAPI GetUpdateRect16( HWND16 hwnd, LPRECT16 rect, BOOL16 erase )
|
||||
{
|
||||
RECT r;
|
||||
BOOL16 ret;
|
||||
|
||||
if (!rect) return GetUpdateRect( hwnd, NULL, erase );
|
||||
ret = GetUpdateRect( hwnd, &r, erase );
|
||||
CONV_RECT32TO16( &r, rect );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetUpdateRect (USER32.@)
|
||||
*/
|
||||
|
@ -1138,15 +1001,6 @@ END:
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetUpdateRgn (USER.237)
|
||||
*/
|
||||
INT16 WINAPI GetUpdateRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 erase )
|
||||
{
|
||||
return GetUpdateRgn( hwnd, hrgn, erase );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetUpdateRgn (USER32.@)
|
||||
*/
|
||||
|
@ -1182,15 +1036,6 @@ END:
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ExcludeUpdateRgn (USER.238)
|
||||
*/
|
||||
INT16 WINAPI ExcludeUpdateRgn16( HDC16 hdc, HWND16 hwnd )
|
||||
{
|
||||
return ExcludeUpdateRgn( hdc, hwnd );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ExcludeUpdateRgn (USER32.@)
|
||||
*/
|
||||
|
@ -1366,28 +1211,6 @@ BOOL WINAPI DrawFocusRect( HDC hdc, const RECT* rc )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* DrawAnimatedRects (USER.448)
|
||||
*/
|
||||
BOOL16 WINAPI DrawAnimatedRects16( HWND16 hwnd, INT16 idAni,
|
||||
const RECT16* lprcFrom,
|
||||
const RECT16* lprcTo )
|
||||
{
|
||||
RECT rcFrom32, rcTo32;
|
||||
|
||||
rcFrom32.left = (INT)lprcFrom->left;
|
||||
rcFrom32.top = (INT)lprcFrom->top;
|
||||
rcFrom32.right = (INT)lprcFrom->right;
|
||||
rcFrom32.bottom = (INT)lprcFrom->bottom;
|
||||
|
||||
rcTo32.left = (INT)lprcTo->left;
|
||||
rcTo32.top = (INT)lprcTo->top;
|
||||
rcTo32.right = (INT)lprcTo->right;
|
||||
rcTo32.bottom = (INT)lprcTo->bottom;
|
||||
|
||||
return DrawAnimatedRects((HWND)hwnd, (INT)idAni, &rcFrom32, &rcTo32);
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* DrawAnimatedRects (USER32.@)
|
||||
|
@ -1681,7 +1504,7 @@ UINT16 WINAPI RealizePalette16( HDC16 hDC )
|
|||
{
|
||||
/* send palette change notification */
|
||||
HWND hWnd = WindowFromDC( hDC );
|
||||
if (hWnd) SendMessageA( HWND_BROADCAST, WM_PALETTECHANGED, hWnd, 0L);
|
||||
if (hWnd) SendMessageA( HWND_BROADCAST, WM_PALETTECHANGED, (WPARAM)hWnd, 0L);
|
||||
}
|
||||
return realized;
|
||||
}
|
||||
|
|
|
@ -67,15 +67,6 @@ END:
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetProp (USER.25)
|
||||
*/
|
||||
HANDLE16 WINAPI GetProp16( HWND16 hwnd, LPCSTR str )
|
||||
{
|
||||
return (HANDLE16)GetPropA( hwnd, str );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetPropA (USER32.@)
|
||||
*/
|
||||
|
@ -110,15 +101,6 @@ HANDLE WINAPI GetPropW( HWND hwnd, LPCWSTR str )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetProp (USER.26)
|
||||
*/
|
||||
BOOL16 WINAPI SetProp16( HWND16 hwnd, LPCSTR str, HANDLE16 handle )
|
||||
{
|
||||
return (BOOL16)SetPropA( hwnd, str, handle );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetPropA (USER32.@)
|
||||
*/
|
||||
|
@ -175,15 +157,6 @@ BOOL WINAPI SetPropW( HWND hwnd, LPCWSTR str, HANDLE handle )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RemoveProp (USER.24)
|
||||
*/
|
||||
HANDLE16 WINAPI RemoveProp16( HWND16 hwnd, LPCSTR str )
|
||||
{
|
||||
return (HANDLE16)RemovePropA( hwnd, str );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RemovePropA (USER32.@)
|
||||
*/
|
||||
|
@ -282,7 +255,7 @@ INT16 WINAPI EnumProps16( HWND16 hwnd, PROPENUMPROC16 func )
|
|||
INT16 ret = -1;
|
||||
|
||||
TRACE("%04x %08x\n", hwnd, (UINT)func );
|
||||
if (!(pWnd = WIN_FindWndPtr( hwnd ))) return -1;
|
||||
if (!(pWnd = WIN_FindWndPtr16( hwnd ))) return -1;
|
||||
for (prop = pWnd->pProp; (prop); prop = next)
|
||||
{
|
||||
/* Already get the next in case the callback */
|
||||
|
|
|
@ -463,7 +463,7 @@ HTASK16 WINAPI GetWindowTask16( HWND16 hwnd )
|
|||
HTASK16 retvalue;
|
||||
MESSAGEQUEUE *queue;
|
||||
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
WND *wndPtr = WIN_FindWndPtr16( hwnd );
|
||||
if (!wndPtr) return 0;
|
||||
|
||||
queue = QUEUE_Lock( wndPtr->hmemTaskQ );
|
||||
|
|
|
@ -18,20 +18,6 @@
|
|||
|
||||
DEFAULT_DEBUG_CHANNEL(scroll);
|
||||
|
||||
/*************************************************************************
|
||||
* ScrollWindow (USER.61)
|
||||
*/
|
||||
void WINAPI ScrollWindow16(HWND16 hwnd, INT16 dx, INT16 dy, const RECT16 *rect,
|
||||
const RECT16 *clipRect )
|
||||
{
|
||||
RECT rect32, clipRect32;
|
||||
|
||||
if (rect) CONV_RECT16TO32( rect, &rect32 );
|
||||
if (clipRect) CONV_RECT16TO32( clipRect, &clipRect32 );
|
||||
ScrollWindow( hwnd, dx, dy, rect ? &rect32 : NULL,
|
||||
clipRect ? &clipRect32 : NULL );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* ScrollWindow (USER32.@)
|
||||
*
|
||||
|
@ -81,27 +67,6 @@ BOOL WINAPI ScrollDC( HDC hdc, INT dx, INT dy, const RECT *rc,
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* ScrollWindowEx (USER.319)
|
||||
*/
|
||||
INT16 WINAPI ScrollWindowEx16( HWND16 hwnd, INT16 dx, INT16 dy,
|
||||
const RECT16 *rect, const RECT16 *clipRect,
|
||||
HRGN16 hrgnUpdate, LPRECT16 rcUpdate,
|
||||
UINT16 flags )
|
||||
{
|
||||
RECT rect32, clipRect32, rcUpdate32;
|
||||
BOOL16 ret;
|
||||
|
||||
if (rect) CONV_RECT16TO32( rect, &rect32 );
|
||||
if (clipRect) CONV_RECT16TO32( clipRect, &clipRect32 );
|
||||
ret = ScrollWindowEx( hwnd, dx, dy, rect ? &rect32 : NULL,
|
||||
clipRect ? &clipRect32 : NULL, hrgnUpdate,
|
||||
(rcUpdate) ? &rcUpdate32 : NULL, flags );
|
||||
if (rcUpdate) CONV_RECT32TO16( &rcUpdate32, rcUpdate );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* ScrollWindowEx (USER32.@)
|
||||
*
|
||||
|
|
|
@ -1956,8 +1956,8 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
|
|||
{
|
||||
case SPY_DISPATCHMESSAGE16:
|
||||
TRACE("%*s(%04x) %-16s message [%04x] %s dispatched wp=%04x lp=%08lx\n",
|
||||
SPY_IndentLevel, "", hWnd, sp_e.wnd_name, msg,
|
||||
sp_e.msg_name, wParam, lParam);
|
||||
SPY_IndentLevel, "", WIN_Handle16(hWnd),
|
||||
sp_e.wnd_name, msg, sp_e.msg_name, wParam, lParam);
|
||||
break;
|
||||
|
||||
case SPY_DISPATCHMESSAGE:
|
||||
|
@ -1970,7 +1970,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
|
|||
case SPY_SENDMESSAGE:
|
||||
{
|
||||
char taskName[30];
|
||||
HTASK16 hTask = GetWindowTask16(hWnd);
|
||||
HTASK16 hTask = GetWindowTask16( WIN_Handle16(hWnd) );
|
||||
|
||||
if (hTask == GetCurrentTask()) strcpy( taskName, "self" );
|
||||
else if (!hTask) strcpy( taskName, "Wine" );
|
||||
|
@ -1982,8 +1982,8 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
|
|||
|
||||
if (iFlag == SPY_SENDMESSAGE16)
|
||||
TRACE("%*s(%04x) %-16s message [%04x] %s sent from %s wp=%04x lp=%08lx\n",
|
||||
SPY_IndentLevel, "", hWnd, sp_e.wnd_name, msg,
|
||||
sp_e.msg_name, taskName, wParam, lParam );
|
||||
SPY_IndentLevel, "", WIN_Handle16(hWnd), sp_e.wnd_name, msg,
|
||||
sp_e.msg_name, taskName, wParam, lParam );
|
||||
else
|
||||
{ TRACE("%*s(%08x) %-16s message [%04x] %s sent from %s wp=%08x lp=%08lx\n",
|
||||
SPY_IndentLevel, "", hWnd, sp_e.wnd_name, msg,
|
||||
|
@ -1996,8 +1996,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
|
|||
case SPY_DEFWNDPROC16:
|
||||
if( SPY_ExcludeDWP ) return;
|
||||
TRACE("%*s(%04x) DefWindowProc16: %s [%04x] wp=%04x lp=%08lx\n",
|
||||
SPY_IndentLevel, "", hWnd, sp_e.msg_name,
|
||||
msg, wParam, lParam );
|
||||
SPY_IndentLevel, "", WIN_Handle16(hWnd), sp_e.msg_name, msg, wParam, lParam );
|
||||
break;
|
||||
|
||||
case SPY_DEFWNDPROC:
|
||||
|
@ -2036,7 +2035,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
|
|||
{
|
||||
case SPY_RESULT_DEFWND16:
|
||||
TRACE(" %*s(%04x) DefWindowProc16: %s [%04x] returned %08lx\n",
|
||||
SPY_IndentLevel, "", hWnd, sp_e.msg_name, msg, lReturn );
|
||||
SPY_IndentLevel, "", WIN_Handle16(hWnd), sp_e.msg_name, msg, lReturn );
|
||||
break;
|
||||
|
||||
case SPY_RESULT_DEFWND:
|
||||
|
@ -2046,8 +2045,8 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
|
|||
|
||||
case SPY_RESULT_OK16:
|
||||
TRACE(" %*s(%04x) %-16s message [%04x] %s returned %08lx\n",
|
||||
SPY_IndentLevel, "", hWnd, sp_e.wnd_name, msg,
|
||||
sp_e.msg_name, lReturn );
|
||||
SPY_IndentLevel, "", WIN_Handle16(hWnd), sp_e.wnd_name, msg,
|
||||
sp_e.msg_name, lReturn );
|
||||
break;
|
||||
|
||||
case SPY_RESULT_OK:
|
||||
|
@ -2059,8 +2058,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
|
|||
|
||||
case SPY_RESULT_INVALIDHWND16:
|
||||
WARN(" %*s(%04x) %-16s message [%04x] %s HAS INVALID HWND\n",
|
||||
SPY_IndentLevel, "", hWnd, sp_e.wnd_name, msg,
|
||||
sp_e.msg_name );
|
||||
SPY_IndentLevel, "", WIN_Handle16(hWnd), sp_e.wnd_name, msg, sp_e.msg_name );
|
||||
break;
|
||||
|
||||
case SPY_RESULT_INVALIDHWND:
|
||||
|
|
|
@ -5,11 +5,12 @@
|
|||
*/
|
||||
|
||||
#include "struct32.h"
|
||||
#include "win.h"
|
||||
#include "winerror.h"
|
||||
|
||||
void STRUCT32_MSG16to32(const MSG16 *msg16,MSG *msg32)
|
||||
{
|
||||
msg32->hwnd=(HWND)msg16->hwnd;
|
||||
msg32->hwnd = WIN_Handle32(msg16->hwnd);
|
||||
msg32->message=msg16->message;
|
||||
msg32->wParam=msg16->wParam;
|
||||
msg32->lParam=msg16->lParam;
|
||||
|
@ -20,7 +21,7 @@ void STRUCT32_MSG16to32(const MSG16 *msg16,MSG *msg32)
|
|||
|
||||
void STRUCT32_MSG32to16(const MSG *msg32,MSG16 *msg16)
|
||||
{
|
||||
msg16->hwnd=(HWND16)msg32->hwnd;
|
||||
msg16->hwnd = WIN_Handle16(msg32->hwnd);
|
||||
msg16->message=msg32->message;
|
||||
msg16->wParam=msg32->wParam;
|
||||
msg16->lParam=msg32->lParam;
|
||||
|
@ -49,24 +50,25 @@ void STRUCT32_MINMAXINFO16to32( const MINMAXINFO16 *from, MINMAXINFO *to )
|
|||
|
||||
void STRUCT32_WINDOWPOS32to16( const WINDOWPOS* from, WINDOWPOS16* to )
|
||||
{
|
||||
to->hwnd = (HWND16)from->hwnd;
|
||||
to->hwndInsertAfter = (HWND16)from->hwndInsertAfter;
|
||||
to->x = (INT16)from->x;
|
||||
to->y = (INT16)from->y;
|
||||
to->cx = (INT16)from->cx;
|
||||
to->cy = (INT16)from->cy;
|
||||
to->flags = (UINT16)from->flags;
|
||||
to->hwnd = WIN_Handle16(from->hwnd);
|
||||
to->hwndInsertAfter = WIN_Handle16(from->hwndInsertAfter);
|
||||
to->x = from->x;
|
||||
to->y = from->y;
|
||||
to->cx = from->cx;
|
||||
to->cy = from->cy;
|
||||
to->flags = from->flags;
|
||||
}
|
||||
|
||||
void STRUCT32_WINDOWPOS16to32( const WINDOWPOS16* from, WINDOWPOS* to )
|
||||
{
|
||||
to->hwnd = (HWND)from->hwnd;
|
||||
to->hwndInsertAfter = (HWND)from->hwndInsertAfter;
|
||||
to->x = (INT)from->x;
|
||||
to->y = (INT)from->y;
|
||||
to->cx = (INT)from->cx;
|
||||
to->cy = (INT)from->cy;
|
||||
to->flags = (UINT)from->flags;
|
||||
to->hwnd = WIN_Handle32(from->hwnd);
|
||||
to->hwndInsertAfter = (from->hwndInsertAfter == (HWND16)-1) ?
|
||||
HWND_TOPMOST : WIN_Handle32(from->hwndInsertAfter);
|
||||
to->x = from->x;
|
||||
to->y = from->y;
|
||||
to->cx = from->cx;
|
||||
to->cy = from->cy;
|
||||
to->flags = from->flags;
|
||||
}
|
||||
|
||||
/* The strings are not copied */
|
||||
|
@ -76,11 +78,11 @@ void STRUCT32_CREATESTRUCT32Ato16( const CREATESTRUCTA* from,
|
|||
to->lpCreateParams = from->lpCreateParams;
|
||||
to->hInstance = (HINSTANCE16)from->hInstance;
|
||||
to->hMenu = (HMENU16)from->hMenu;
|
||||
to->hwndParent = (HWND16)from->hwndParent;
|
||||
to->cy = (INT16)from->cy;
|
||||
to->cx = (INT16)from->cx;
|
||||
to->y = (INT16)from->y;
|
||||
to->x = (INT16)from->x;
|
||||
to->hwndParent = WIN_Handle16(from->hwndParent);
|
||||
to->cy = from->cy;
|
||||
to->cx = from->cx;
|
||||
to->y = from->y;
|
||||
to->x = from->x;
|
||||
to->style = from->style;
|
||||
to->dwExStyle = from->dwExStyle;
|
||||
}
|
||||
|
@ -91,11 +93,11 @@ void STRUCT32_CREATESTRUCT16to32A( const CREATESTRUCT16* from,
|
|||
to->lpCreateParams = from->lpCreateParams;
|
||||
to->hInstance = (HINSTANCE)from->hInstance;
|
||||
to->hMenu = (HMENU)from->hMenu;
|
||||
to->hwndParent = (HWND)from->hwndParent;
|
||||
to->cy = (INT)from->cy;
|
||||
to->cx = (INT)from->cx;
|
||||
to->y = (INT)from->y;
|
||||
to->x = (INT)from->x;
|
||||
to->hwndParent = WIN_Handle32(from->hwndParent);
|
||||
to->cy = from->cy;
|
||||
to->cx = from->cx;
|
||||
to->y = from->y;
|
||||
to->x = from->x;
|
||||
to->style = from->style;
|
||||
to->dwExStyle = from->dwExStyle;
|
||||
}
|
||||
|
@ -105,11 +107,11 @@ void STRUCT32_MDICREATESTRUCT32Ato16( const MDICREATESTRUCTA* from,
|
|||
MDICREATESTRUCT16* to )
|
||||
{
|
||||
to->hOwner = (HINSTANCE16)from->hOwner;
|
||||
to->x = (INT16)from->x;
|
||||
to->y = (INT16)from->y;
|
||||
to->cx = (INT16)from->cx;
|
||||
to->cy = (INT16)from->cy;
|
||||
to->style = from->style;
|
||||
to->x = from->x;
|
||||
to->y = from->y;
|
||||
to->cx = from->cx;
|
||||
to->cy = from->cy;
|
||||
to->style = from->style;
|
||||
to->lParam = from->lParam;
|
||||
}
|
||||
|
||||
|
@ -117,11 +119,11 @@ void STRUCT32_MDICREATESTRUCT16to32A( const MDICREATESTRUCT16* from,
|
|||
MDICREATESTRUCTA *to )
|
||||
{
|
||||
to->hOwner = (HINSTANCE)from->hOwner;
|
||||
to->x = (INT)from->x;
|
||||
to->y = (INT)from->y;
|
||||
to->cx = (INT)from->cx;
|
||||
to->cy = (INT)from->cy;
|
||||
to->style = from->style;
|
||||
to->x = from->x;
|
||||
to->y = from->y;
|
||||
to->cx = from->cx;
|
||||
to->cy = from->cy;
|
||||
to->style = from->style;
|
||||
to->lParam = from->lParam;
|
||||
}
|
||||
|
||||
|
|
|
@ -299,16 +299,6 @@ UINT WINAPI SetSystemTimer( HWND hwnd, UINT id, UINT timeout,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* KillTimer (USER.12)
|
||||
*/
|
||||
BOOL16 WINAPI KillTimer16( HWND16 hwnd, UINT16 id )
|
||||
{
|
||||
TRACE("%04x %d\n", hwnd, id );
|
||||
return TIMER_KillTimer( hwnd, id, FALSE );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* KillTimer (USER32.@)
|
||||
*/
|
||||
|
@ -319,16 +309,6 @@ BOOL WINAPI KillTimer( HWND hwnd, UINT id )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* KillSystemTimer (USER.182)
|
||||
*/
|
||||
BOOL16 WINAPI KillSystemTimer16( HWND16 hwnd, UINT16 id )
|
||||
{
|
||||
TRACE("%04x %d\n", hwnd, id );
|
||||
return TIMER_KillTimer( hwnd, id, TRUE );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* KillSystemTimer (USER32.@)
|
||||
*/
|
||||
|
|
367
windows/win.c
367
windows/win.c
|
@ -34,8 +34,6 @@ DECLARE_DEBUG_CHANNEL(msg);
|
|||
/* Desktop window */
|
||||
static WND *pWndDesktop = NULL;
|
||||
|
||||
static HWND hwndSysModal = 0;
|
||||
|
||||
static WORD wDragWidth = 4;
|
||||
static WORD wDragHeight= 3;
|
||||
|
||||
|
@ -80,7 +78,7 @@ void WIN_RestoreWndsLock( int ipreviousLocks )
|
|||
static WND *create_window_handle( BOOL desktop, INT size )
|
||||
{
|
||||
BOOL res;
|
||||
unsigned int handle = 0;
|
||||
user_handle_t handle = 0;
|
||||
WND *win = HeapAlloc( GetProcessHeap(), 0, size );
|
||||
|
||||
if (!win) return NULL;
|
||||
|
@ -111,7 +109,7 @@ static WND *create_window_handle( BOOL desktop, INT size )
|
|||
return NULL;
|
||||
}
|
||||
user_handles[LOWORD(handle)] = win;
|
||||
win->hwndSelf = (HWND)handle;
|
||||
win->hwndSelf = handle;
|
||||
win->dwMagic = WND_MAGIC;
|
||||
win->irefCount = 1;
|
||||
return win;
|
||||
|
@ -177,9 +175,11 @@ static WND *get_wnd_ptr( HWND hwnd )
|
|||
HWND WIN_Handle32( HWND16 hwnd16 )
|
||||
{
|
||||
WND *ptr;
|
||||
HWND hwnd = (HWND)hwnd16;
|
||||
HWND hwnd = (HWND)(ULONG_PTR)hwnd16;
|
||||
|
||||
if (!hwnd || hwnd == HWND_BROADCAST) return hwnd;
|
||||
if (hwnd16 <= 1 || hwnd16 == 0xffff) return hwnd;
|
||||
/* do sign extension for -2 and -3 */
|
||||
if (hwnd16 >= (HWND16)-3) return (HWND)(LONG_PTR)(INT16)hwnd16;
|
||||
|
||||
if ((ptr = get_wnd_ptr( hwnd )))
|
||||
{
|
||||
|
@ -190,7 +190,7 @@ HWND WIN_Handle32( HWND16 hwnd16 )
|
|||
{
|
||||
SERVER_START_REQ( get_window_info )
|
||||
{
|
||||
req->handle = (user_handle_t)hwnd16;
|
||||
req->handle = hwnd;
|
||||
if (!SERVER_CALL_ERR()) hwnd = req->full_handle;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
@ -804,8 +804,10 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
|
|||
|
||||
cbtc.lpcs = cs;
|
||||
cbtc.hwndInsertAfter = hwndLinkAfter;
|
||||
ret = (type == WIN_PROC_32W) ? HOOK_CallHooksW(WH_CBT, HCBT_CREATEWND, hwnd, (LPARAM)&cbtc)
|
||||
: HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND, hwnd, (LPARAM)&cbtc);
|
||||
ret = (type == WIN_PROC_32W) ? HOOK_CallHooksW(WH_CBT, HCBT_CREATEWND,
|
||||
(WPARAM)hwnd, (LPARAM)&cbtc)
|
||||
: HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND,
|
||||
(WPARAM)hwnd, (LPARAM)&cbtc);
|
||||
if (ret)
|
||||
{
|
||||
TRACE("CBT-hook returned 0\n");
|
||||
|
@ -915,7 +917,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
|
|||
/* Call WH_SHELL hook */
|
||||
|
||||
if (!(wndPtr->dwStyle & WS_CHILD) && !wndPtr->owner)
|
||||
HOOK_CallHooksA( WH_SHELL, HSHELL_WINDOWCREATED, hwnd, 0 );
|
||||
HOOK_CallHooksA( WH_SHELL, HSHELL_WINDOWCREATED, (WPARAM)hwnd, 0 );
|
||||
|
||||
TRACE("created window %04x\n", hwnd);
|
||||
end:
|
||||
|
@ -983,13 +985,13 @@ HWND16 WINAPI CreateWindowEx16( DWORD exStyle, LPCSTR className,
|
|||
cs.lpCreateParams = data;
|
||||
cs.hInstance = (HINSTANCE)instance;
|
||||
cs.hMenu = (HMENU)menu;
|
||||
cs.hwndParent = (HWND)parent;
|
||||
cs.hwndParent = WIN_Handle32( parent );
|
||||
cs.style = style;
|
||||
cs.lpszName = windowName;
|
||||
cs.lpszClass = className;
|
||||
cs.dwExStyle = exStyle;
|
||||
|
||||
return WIN_CreateWindowEx( &cs, classAtom, WIN_PROC_16 );
|
||||
return WIN_Handle16( WIN_CreateWindowEx( &cs, classAtom, WIN_PROC_16 ));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1152,15 +1154,6 @@ static void WIN_SendDestroyMsg( HWND hwnd )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DestroyWindow (USER.53)
|
||||
*/
|
||||
BOOL16 WINAPI DestroyWindow16( HWND16 hwnd )
|
||||
{
|
||||
return DestroyWindow(hwnd);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DestroyWindow (USER32.@)
|
||||
*/
|
||||
|
@ -1190,12 +1183,12 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
|
|||
|
||||
/* Call hooks */
|
||||
|
||||
if( HOOK_CallHooksA( WH_CBT, HCBT_DESTROYWND, hwnd, 0L) ) return FALSE;
|
||||
if( HOOK_CallHooksA( WH_CBT, HCBT_DESTROYWND, (WPARAM)hwnd, 0L) ) return FALSE;
|
||||
|
||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE;
|
||||
if (!(wndPtr->dwStyle & WS_CHILD) && !wndPtr->owner)
|
||||
{
|
||||
HOOK_CallHooksA( WH_SHELL, HSHELL_WINDOWDESTROYED, hwnd, 0L );
|
||||
HOOK_CallHooksA( WH_SHELL, HSHELL_WINDOWDESTROYED, (WPARAM)hwnd, 0L );
|
||||
/* FIXME: clean up palette - see "Internals" p.352 */
|
||||
}
|
||||
|
||||
|
@ -1292,15 +1285,6 @@ end:
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CloseWindow (USER.43)
|
||||
*/
|
||||
BOOL16 WINAPI CloseWindow16( HWND16 hwnd )
|
||||
{
|
||||
return CloseWindow( hwnd );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CloseWindow (USER32.@)
|
||||
*/
|
||||
|
@ -1323,15 +1307,6 @@ end:
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* OpenIcon (USER.44)
|
||||
*/
|
||||
BOOL16 WINAPI OpenIcon16( HWND16 hwnd )
|
||||
{
|
||||
return OpenIcon( hwnd );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* OpenIcon (USER32.@)
|
||||
*/
|
||||
|
@ -1398,24 +1373,6 @@ static HWND WIN_FindWindow( HWND parent, HWND child, ATOM className, LPCWSTR tit
|
|||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* FindWindow (USER.50)
|
||||
*/
|
||||
HWND16 WINAPI FindWindow16( LPCSTR className, LPCSTR title )
|
||||
{
|
||||
return FindWindowA( className, title );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* FindWindowEx (USER.427)
|
||||
*/
|
||||
HWND16 WINAPI FindWindowEx16( HWND16 parent, HWND16 child, LPCSTR className, LPCSTR title )
|
||||
{
|
||||
return FindWindowExA( parent, child, className, title );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* FindWindowA (USER32.@)
|
||||
*/
|
||||
|
@ -1486,15 +1443,6 @@ HWND WINAPI FindWindowW( LPCWSTR className, LPCWSTR title )
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetDesktopWindow (USER.286)
|
||||
*/
|
||||
HWND16 WINAPI GetDesktopWindow16(void)
|
||||
{
|
||||
return (HWND16)pWndDesktop->hwndSelf;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetDesktopWindow (USER32.@)
|
||||
*/
|
||||
|
@ -1507,27 +1455,6 @@ HWND WINAPI GetDesktopWindow(void)
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetDesktopHwnd (USER.278)
|
||||
*
|
||||
* Exactly the same thing as GetDesktopWindow(), but not documented.
|
||||
* Don't ask me why...
|
||||
*/
|
||||
HWND16 WINAPI GetDesktopHwnd16(void)
|
||||
{
|
||||
return (HWND16)pWndDesktop->hwndSelf;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* EnableWindow (USER.34)
|
||||
*/
|
||||
BOOL16 WINAPI EnableWindow16( HWND16 hwnd, BOOL16 enable )
|
||||
{
|
||||
return EnableWindow( hwnd, enable );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* EnableWindow (USER32.@)
|
||||
*/
|
||||
|
@ -1570,15 +1497,6 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsWindowEnabled (USER.35)
|
||||
*/
|
||||
BOOL16 WINAPI IsWindowEnabled16(HWND16 hWnd)
|
||||
{
|
||||
return IsWindowEnabled(hWnd);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsWindowEnabled (USER32.@)
|
||||
*/
|
||||
|
@ -1610,15 +1528,6 @@ BOOL WINAPI IsWindowUnicode( HWND hwnd )
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetWindowWord (USER.133)
|
||||
*/
|
||||
WORD WINAPI GetWindowWord16( HWND16 hwnd, INT16 offset )
|
||||
{
|
||||
return GetWindowWord( hwnd, offset );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetWindowWord (USER32.@)
|
||||
*/
|
||||
|
@ -1633,44 +1542,29 @@ WORD WINAPI GetWindowWord( HWND hwnd, INT offset )
|
|||
{
|
||||
WARN("Invalid offset %d\n", offset );
|
||||
retvalue = 0;
|
||||
goto end;
|
||||
}
|
||||
retvalue = *(WORD *)(((char *)wndPtr->wExtra) + offset);
|
||||
goto end;
|
||||
else retvalue = *(WORD *)(((char *)wndPtr->wExtra) + offset);
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
return retvalue;
|
||||
}
|
||||
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
switch(offset)
|
||||
{
|
||||
case GWW_ID:
|
||||
if (HIWORD(wndPtr->wIDmenu))
|
||||
WARN("GWW_ID: discards high bits of 0x%08x!\n",
|
||||
wndPtr->wIDmenu);
|
||||
retvalue = (WORD)wndPtr->wIDmenu;
|
||||
goto end;
|
||||
case GWW_HWNDPARENT:
|
||||
retvalue = GetParent(hwnd);
|
||||
goto end;
|
||||
case GWW_HINSTANCE:
|
||||
if (HIWORD(wndPtr->hInstance))
|
||||
WARN("GWW_HINSTANCE: discards high bits of 0x%08x!\n",
|
||||
wndPtr->hInstance);
|
||||
retvalue = (WORD)wndPtr->hInstance;
|
||||
goto end;
|
||||
case GWL_HWNDPARENT:
|
||||
return GetWindowLongW( hwnd, offset );
|
||||
case GWL_ID:
|
||||
case GWL_HINSTANCE:
|
||||
{
|
||||
LONG ret = GetWindowLongW( hwnd, offset );
|
||||
if (HIWORD(ret))
|
||||
WARN("%d: discards high bits of 0x%08lx!\n", offset, ret );
|
||||
return LOWORD(ret);
|
||||
}
|
||||
default:
|
||||
WARN("Invalid offset %d\n", offset );
|
||||
retvalue = 0;
|
||||
goto end;
|
||||
return 0;
|
||||
}
|
||||
end:
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
return retvalue;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* SetWindowWord (USER.134)
|
||||
*/
|
||||
WORD WINAPI SetWindowWord16( HWND16 hwnd, INT16 offset, WORD newval )
|
||||
{
|
||||
return SetWindowWord( hwnd, offset, newval );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1687,27 +1581,27 @@ WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval )
|
|||
if (offset + sizeof(WORD) > wndPtr->cbWndExtra)
|
||||
{
|
||||
WARN("Invalid offset %d\n", offset );
|
||||
retval = 0;
|
||||
goto end;
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
return 0;
|
||||
}
|
||||
ptr = (WORD *)(((char *)wndPtr->wExtra) + offset);
|
||||
retval = *ptr;
|
||||
*ptr = newval;
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
return retval;
|
||||
}
|
||||
else switch(offset)
|
||||
{
|
||||
case GWW_ID: ptr = (WORD *)&wndPtr->wIDmenu; break;
|
||||
case GWW_HINSTANCE: ptr = (WORD *)&wndPtr->hInstance; break;
|
||||
case GWW_HWNDPARENT: retval = SetParent( hwnd, newval );
|
||||
goto end;
|
||||
default:
|
||||
WARN("Invalid offset %d\n", offset );
|
||||
retval = 0;
|
||||
goto end;
|
||||
}
|
||||
retval = *ptr;
|
||||
*ptr = newval;
|
||||
end:
|
||||
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
return retval;
|
||||
switch(offset)
|
||||
{
|
||||
case GWL_ID:
|
||||
case GWL_HINSTANCE:
|
||||
case GWL_HWNDPARENT:
|
||||
return SetWindowLongW( hwnd, offset, (UINT)newval );
|
||||
default:
|
||||
WARN("Invalid offset %d\n", offset );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1751,7 +1645,7 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
|
|||
case GWL_WNDPROC: retvalue = (LONG)WINPROC_GetProc( wndPtr->winproc,
|
||||
type );
|
||||
goto end;
|
||||
case GWL_HWNDPARENT: retvalue = GetParent(hwnd);
|
||||
case GWL_HWNDPARENT: retvalue = (LONG)GetParent(hwnd);
|
||||
goto end;
|
||||
case GWL_HINSTANCE: retvalue = wndPtr->hInstance;
|
||||
goto end;
|
||||
|
@ -1870,7 +1764,7 @@ end:
|
|||
*/
|
||||
LONG WINAPI GetWindowLong16( HWND16 hwnd, INT16 offset )
|
||||
{
|
||||
return WIN_GetWindowLong( (HWND)hwnd, offset, WIN_PROC_16 );
|
||||
return WIN_GetWindowLong( WIN_Handle32(hwnd), offset, WIN_PROC_16 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1897,7 +1791,7 @@ LONG WINAPI GetWindowLongW( HWND hwnd, INT offset )
|
|||
*/
|
||||
LONG WINAPI SetWindowLong16( HWND16 hwnd, INT16 offset, LONG newval )
|
||||
{
|
||||
return WIN_SetWindowLong( hwnd, offset, newval, WIN_PROC_16 );
|
||||
return WIN_SetWindowLong( WIN_Handle32(hwnd), offset, newval, WIN_PROC_16 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1994,15 +1888,6 @@ LONG WINAPI SetWindowLongW(
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetWindowText (USER.36)
|
||||
*/
|
||||
INT16 WINAPI GetWindowText16( HWND16 hwnd, SEGPTR lpString, INT16 nMaxCount )
|
||||
{
|
||||
return (INT16)SendMessage16(hwnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetWindowTextA (USER32.@)
|
||||
*/
|
||||
|
@ -2036,15 +1921,6 @@ INT WINAPI GetWindowTextW( HWND hwnd, LPWSTR lpString, INT nMaxCount )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetWindowText (USER.37)
|
||||
*/
|
||||
BOOL16 WINAPI SetWindowText16( HWND16 hwnd, SEGPTR lpString )
|
||||
{
|
||||
return (BOOL16)SendMessage16( hwnd, WM_SETTEXT, 0, (LPARAM)lpString );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetWindowText (USER32.@)
|
||||
* SetWindowTextA (USER32.@)
|
||||
|
@ -2064,15 +1940,6 @@ BOOL WINAPI SetWindowTextW( HWND hwnd, LPCWSTR lpString )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetWindowTextLength (USER.38)
|
||||
*/
|
||||
INT16 WINAPI GetWindowTextLength16( HWND16 hwnd )
|
||||
{
|
||||
return (INT16)GetWindowTextLengthA( hwnd );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetWindowTextLengthA (USER32.@)
|
||||
*/
|
||||
|
@ -2090,16 +1957,6 @@ INT WINAPI GetWindowTextLengthW( HWND hwnd )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* IsWindow (USER.47)
|
||||
*/
|
||||
BOOL16 WINAPI IsWindow16( HWND16 hwnd )
|
||||
{
|
||||
CURRENT_STACK16->es = USER_HeapSel;
|
||||
return IsWindow( hwnd );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* IsWindow (USER32.@)
|
||||
*/
|
||||
|
@ -2166,15 +2023,6 @@ DWORD WINAPI GetWindowThreadProcessId( HWND hwnd, LPDWORD process )
|
|||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* GetParent (USER.46)
|
||||
*/
|
||||
HWND16 WINAPI GetParent16( HWND16 hwnd )
|
||||
{
|
||||
return (HWND16)GetParent( hwnd );
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* GetParent (USER32.@)
|
||||
*/
|
||||
|
@ -2233,15 +2081,6 @@ HWND WINAPI GetAncestor( HWND hwnd, UINT type )
|
|||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* SetParent (USER.233)
|
||||
*/
|
||||
HWND16 WINAPI SetParent16( HWND16 hwndChild, HWND16 hwndNewParent )
|
||||
{
|
||||
return SetParent( hwndChild, hwndNewParent );
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* SetParent (USER32.@)
|
||||
*/
|
||||
|
@ -2301,15 +2140,6 @@ HWND WINAPI SetParent( HWND hwnd, HWND parent )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* IsChild (USER.48)
|
||||
*/
|
||||
BOOL16 WINAPI IsChild16( HWND16 parent, HWND16 child )
|
||||
{
|
||||
return IsChild(parent,child);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* IsChild (USER32.@)
|
||||
*/
|
||||
|
@ -2328,15 +2158,6 @@ BOOL WINAPI IsChild( HWND parent, HWND child )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsWindowVisible (USER.49)
|
||||
*/
|
||||
BOOL16 WINAPI IsWindowVisible16( HWND16 hwnd )
|
||||
{
|
||||
return IsWindowVisible(hwnd);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsWindowVisible (USER32.@)
|
||||
*/
|
||||
|
@ -2383,15 +2204,6 @@ BOOL WIN_IsWindowDrawable( WND* wnd, BOOL icon )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetTopWindow (USER.229)
|
||||
*/
|
||||
HWND16 WINAPI GetTopWindow16( HWND16 hwnd )
|
||||
{
|
||||
return GetTopWindow(hwnd);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetTopWindow (USER32.@)
|
||||
*/
|
||||
|
@ -2402,15 +2214,6 @@ HWND WINAPI GetTopWindow( HWND hwnd )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetWindow (USER.262)
|
||||
*/
|
||||
HWND16 WINAPI GetWindow16( HWND16 hwnd, WORD rel )
|
||||
{
|
||||
return GetWindow( hwnd,rel );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetWindow (USER32.@)
|
||||
*/
|
||||
|
@ -2484,15 +2287,6 @@ end:
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetNextWindow (USER.230)
|
||||
*/
|
||||
HWND16 WINAPI GetNextWindow16( HWND16 hwnd, WORD flag )
|
||||
{
|
||||
if ((flag != GW_HWNDNEXT) && (flag != GW_HWNDPREV)) return 0;
|
||||
return GetWindow16( hwnd, flag );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* WIN_InternalShowOwnedPopups
|
||||
*
|
||||
|
@ -2557,15 +2351,6 @@ BOOL WIN_InternalShowOwnedPopups( HWND owner, BOOL fShow, BOOL unmanagedOnly )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* ShowOwnedPopups (USER.265)
|
||||
*/
|
||||
void WINAPI ShowOwnedPopups16( HWND16 owner, BOOL16 fShow )
|
||||
{
|
||||
ShowOwnedPopups( owner, fShow );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ShowOwnedPopups (USER32.@)
|
||||
*/
|
||||
|
@ -2617,14 +2402,6 @@ BOOL WINAPI ShowOwnedPopups( HWND owner, BOOL fShow )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetLastActivePopup (USER.287)
|
||||
*/
|
||||
HWND16 WINAPI GetLastActivePopup16( HWND16 hwnd )
|
||||
{
|
||||
return GetLastActivePopup( hwnd );
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* GetLastActivePopup (USER32.@)
|
||||
*/
|
||||
|
@ -2872,15 +2649,6 @@ BOOL WINAPI AnyPopup(void)
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* FlashWindow (USER.105)
|
||||
*/
|
||||
BOOL16 WINAPI FlashWindow16( HWND16 hWnd, BOOL16 bInvert )
|
||||
{
|
||||
return FlashWindow( hWnd, bInvert );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* FlashWindow (USER32.@)
|
||||
*/
|
||||
|
@ -2926,27 +2694,6 @@ BOOL WINAPI FlashWindow( HWND hWnd, BOOL bInvert )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetSysModalWindow (USER.188)
|
||||
*/
|
||||
HWND16 WINAPI SetSysModalWindow16( HWND16 hWnd )
|
||||
{
|
||||
HWND hWndOldModal = hwndSysModal;
|
||||
hwndSysModal = hWnd;
|
||||
FIXME("EMPTY STUB !! SetSysModalWindow(%04x) !\n", hWnd);
|
||||
return hWndOldModal;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetSysModalWindow (USER.189)
|
||||
*/
|
||||
HWND16 WINAPI GetSysModalWindow16(void)
|
||||
{
|
||||
return hwndSysModal;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetWindowContextHelpId (USER32.@)
|
||||
*/
|
||||
|
@ -3043,16 +2790,6 @@ BOOL16 DRAG_QueryUpdate( HWND hQueryWnd, SEGPTR spDragInfo, BOOL bNoSend )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* DragDetect (USER.465)
|
||||
*/
|
||||
BOOL16 WINAPI DragDetect16( HWND16 hWnd, POINT16 pt )
|
||||
{
|
||||
POINT pt32;
|
||||
CONV_POINT16TO32( &pt, &pt32 );
|
||||
return DragDetect( hWnd, pt32 );
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* DragDetect (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "wingdi.h"
|
||||
#include "wine/winuser16.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "win.h"
|
||||
#include "heap.h"
|
||||
|
||||
DEFAULT_DEBUG_CHANNEL(win);
|
||||
|
@ -39,13 +40,13 @@ BOOL16 WINAPI WinHelp16( HWND16 hWnd, LPCSTR lpHelpFile, UINT16 wCommand,
|
|||
/* We might call WinExec() */
|
||||
ReleaseThunkLock( &mutex_count );
|
||||
|
||||
if (!(ret = WinHelpA( hWnd, lpHelpFile, wCommand, (DWORD)MapSL(dwData) )))
|
||||
if (!(ret = WinHelpA( WIN_Handle32(hWnd), lpHelpFile, wCommand, (DWORD)MapSL(dwData) )))
|
||||
{
|
||||
/* try to start the 16-bit winhelp */
|
||||
if (WinExec( "winhelp.exe -x", SW_SHOWNORMAL ) >= 32)
|
||||
{
|
||||
K32WOWYield16();
|
||||
ret = WinHelpA( hWnd, lpHelpFile, wCommand, (DWORD)MapSL(dwData) );
|
||||
ret = WinHelpA( WIN_Handle32(hWnd), lpHelpFile, wCommand, (DWORD)MapSL(dwData) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
400
windows/winpos.c
400
windows/winpos.c
|
@ -116,13 +116,6 @@ void WINPOS_CheckInternalPos( HWND hwnd )
|
|||
return;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* ArrangeIconicWindows (USER.170)
|
||||
*/
|
||||
UINT16 WINAPI ArrangeIconicWindows16( HWND16 parent)
|
||||
{
|
||||
return ArrangeIconicWindows(parent);
|
||||
}
|
||||
/***********************************************************************
|
||||
* ArrangeIconicWindows (USER32.@)
|
||||
*/
|
||||
|
@ -164,15 +157,6 @@ UINT WINAPI ArrangeIconicWindows( HWND parent )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SwitchToThisWindow (USER.172)
|
||||
*/
|
||||
void WINAPI SwitchToThisWindow16( HWND16 hwnd, BOOL16 restore )
|
||||
{
|
||||
SwitchToThisWindow( hwnd, restore );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SwitchToThisWindow (USER32.@)
|
||||
*/
|
||||
|
@ -182,21 +166,6 @@ void WINAPI SwitchToThisWindow( HWND hwnd, BOOL restore )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetWindowRect (USER.32)
|
||||
*/
|
||||
void WINAPI GetWindowRect16( HWND16 hwnd, LPRECT16 rect )
|
||||
{
|
||||
RECT rect32;
|
||||
|
||||
GetWindowRect( hwnd, &rect32 );
|
||||
rect->left = rect32.left;
|
||||
rect->top = rect32.top;
|
||||
rect->right = rect32.right;
|
||||
rect->bottom = rect32.bottom;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetWindowRect (USER32.@)
|
||||
*/
|
||||
|
@ -273,34 +242,6 @@ int WINAPI SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL bRedraw )
|
|||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetWindowRgn (USER.668)
|
||||
*/
|
||||
INT16 WINAPI SetWindowRgn16( HWND16 hwnd, HRGN16 hrgn,BOOL16 bRedraw)
|
||||
|
||||
{
|
||||
|
||||
FIXME("SetWindowRgn16: stub\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetClientRect (USER.33)
|
||||
*/
|
||||
void WINAPI GetClientRect16( HWND16 hwnd, LPRECT16 rect )
|
||||
{
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
rect->left = rect->top = rect->right = rect->bottom = 0;
|
||||
if (wndPtr)
|
||||
{
|
||||
rect->right = wndPtr->rectClient.right - wndPtr->rectClient.left;
|
||||
rect->bottom = wndPtr->rectClient.bottom - wndPtr->rectClient.top;
|
||||
}
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetClientRect (USER32.@)
|
||||
|
@ -321,15 +262,6 @@ BOOL WINAPI GetClientRect( HWND hwnd, LPRECT rect )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ClientToScreen (USER.28)
|
||||
*/
|
||||
void WINAPI ClientToScreen16( HWND16 hwnd, LPPOINT16 lppnt )
|
||||
{
|
||||
MapWindowPoints16( hwnd, 0, lppnt, 1 );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ClientToScreen (USER32.@)
|
||||
*/
|
||||
|
@ -340,15 +272,6 @@ BOOL WINAPI ClientToScreen( HWND hwnd, LPPOINT lppnt )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ScreenToClient (USER.29)
|
||||
*/
|
||||
void WINAPI ScreenToClient16( HWND16 hwnd, LPPOINT16 lppnt )
|
||||
{
|
||||
MapWindowPoints16( 0, hwnd, lppnt, 1 );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ScreenToClient (USER32.@)
|
||||
*/
|
||||
|
@ -489,18 +412,6 @@ end:
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* WindowFromPoint (USER.30)
|
||||
*/
|
||||
HWND16 WINAPI WindowFromPoint16( POINT16 pt )
|
||||
{
|
||||
POINT pt32;
|
||||
|
||||
CONV_POINT16TO32( &pt, &pt32 );
|
||||
return WindowFromPoint( pt32 );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* WindowFromPoint (USER32.@)
|
||||
*/
|
||||
|
@ -511,17 +422,6 @@ HWND WINAPI WindowFromPoint( POINT pt )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ChildWindowFromPoint (USER.191)
|
||||
*/
|
||||
HWND16 WINAPI ChildWindowFromPoint16( HWND16 hwndParent, POINT16 pt )
|
||||
{
|
||||
POINT pt32;
|
||||
CONV_POINT16TO32( &pt, &pt32 );
|
||||
return (HWND16)ChildWindowFromPoint( hwndParent, pt32 );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ChildWindowFromPoint (USER32.@)
|
||||
*/
|
||||
|
@ -530,17 +430,6 @@ HWND WINAPI ChildWindowFromPoint( HWND hwndParent, POINT pt )
|
|||
return ChildWindowFromPointEx( hwndParent, pt, CWP_ALL );
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* ChildWindowFromPointEx (USER.399)
|
||||
*/
|
||||
HWND16 WINAPI ChildWindowFromPointEx16( HWND16 hwndParent, POINT16 pt, UINT16 uFlags)
|
||||
{
|
||||
POINT pt32;
|
||||
CONV_POINT16TO32( &pt, &pt32 );
|
||||
return (HWND16)ChildWindowFromPointEx( hwndParent, pt32, uFlags );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ChildWindowFromPointEx (USER32.@)
|
||||
*/
|
||||
|
@ -665,15 +554,6 @@ INT WINAPI MapWindowPoints( HWND hwndFrom, HWND hwndTo,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsIconic (USER.31)
|
||||
*/
|
||||
BOOL16 WINAPI IsIconic16(HWND16 hWnd)
|
||||
{
|
||||
return IsIconic(hWnd);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsIconic (USER32.@)
|
||||
*/
|
||||
|
@ -686,15 +566,6 @@ BOOL WINAPI IsIconic(HWND hWnd)
|
|||
WIN_ReleaseWndPtr(wndPtr);
|
||||
return retvalue;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* IsZoomed (USER.272)
|
||||
*/
|
||||
BOOL16 WINAPI IsZoomed16(HWND16 hWnd)
|
||||
{
|
||||
return IsZoomed(hWnd);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -711,14 +582,6 @@ BOOL WINAPI IsZoomed(HWND hWnd)
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetActiveWindow (USER.60)
|
||||
*/
|
||||
HWND16 WINAPI GetActiveWindow16(void)
|
||||
{
|
||||
return (HWND16)GetActiveWindow();
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* GetActiveWindow (USER32.@)
|
||||
*/
|
||||
|
@ -748,15 +611,6 @@ static BOOL WINPOS_CanActivate(HWND hwnd)
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetActiveWindow (USER.59)
|
||||
*/
|
||||
HWND16 WINAPI SetActiveWindow16( HWND16 hwnd )
|
||||
{
|
||||
return SetActiveWindow(hwnd);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetActiveWindow (USER32.@)
|
||||
*/
|
||||
|
@ -810,24 +664,6 @@ end:
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetForegroundWindow (USER.608)
|
||||
*/
|
||||
HWND16 WINAPI GetForegroundWindow16(void)
|
||||
{
|
||||
return (HWND16)GetForegroundWindow();
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetForegroundWindow (USER.609)
|
||||
*/
|
||||
BOOL16 WINAPI SetForegroundWindow16( HWND16 hwnd )
|
||||
{
|
||||
return SetForegroundWindow( hwnd );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetForegroundWindow (USER32.@)
|
||||
*/
|
||||
|
@ -879,14 +715,6 @@ BOOL WINAPI LockSetForegroundWindow( UINT lockcode )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* GetShellWindow (USER.600)
|
||||
*/
|
||||
HWND16 WINAPI GetShellWindow16(void)
|
||||
{
|
||||
return GetShellWindow();
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* SetShellWindow (USER32.@)
|
||||
*/
|
||||
|
@ -908,15 +736,6 @@ HWND WINAPI GetShellWindow(void)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* BringWindowToTop (USER.45)
|
||||
*/
|
||||
BOOL16 WINAPI BringWindowToTop16( HWND16 hwnd )
|
||||
{
|
||||
return BringWindowToTop(hwnd);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* BringWindowToTop (USER32.@)
|
||||
*/
|
||||
|
@ -926,16 +745,6 @@ BOOL WINAPI BringWindowToTop( HWND hwnd )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MoveWindow (USER.56)
|
||||
*/
|
||||
BOOL16 WINAPI MoveWindow16( HWND16 hwnd, INT16 x, INT16 y, INT16 cx, INT16 cy,
|
||||
BOOL16 repaint )
|
||||
{
|
||||
return MoveWindow(hwnd,x,y,cx,cy,repaint);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MoveWindow (USER32.@)
|
||||
*/
|
||||
|
@ -1115,15 +924,6 @@ BOOL WINAPI ShowWindowAsync( HWND hwnd, INT cmd )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ShowWindow (USER.42)
|
||||
*/
|
||||
BOOL16 WINAPI ShowWindow16( HWND16 hwnd, INT16 cmd )
|
||||
{
|
||||
return ShowWindow(hwnd,cmd);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ShowWindow (USER32.@)
|
||||
*/
|
||||
|
@ -1166,36 +966,6 @@ UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetWindowPlacement (USER.370)
|
||||
*/
|
||||
BOOL16 WINAPI GetWindowPlacement16( HWND16 hwnd, WINDOWPLACEMENT16 *wndpl )
|
||||
{
|
||||
WND *pWnd = WIN_FindWndPtr( hwnd );
|
||||
LPINTERNALPOS lpPos;
|
||||
|
||||
if(!pWnd ) return FALSE;
|
||||
|
||||
lpPos = (LPINTERNALPOS)WINPOS_InitInternalPos( pWnd,
|
||||
*(LPPOINT)&pWnd->rectWindow.left, &pWnd->rectWindow );
|
||||
wndpl->length = sizeof(*wndpl);
|
||||
if( pWnd->dwStyle & WS_MINIMIZE )
|
||||
wndpl->showCmd = SW_SHOWMINIMIZED;
|
||||
else
|
||||
wndpl->showCmd = ( pWnd->dwStyle & WS_MAXIMIZE )
|
||||
? SW_SHOWMAXIMIZED : SW_SHOWNORMAL ;
|
||||
if( pWnd->flags & WIN_RESTORE_MAX )
|
||||
wndpl->flags = WPF_RESTORETOMAXIMIZED;
|
||||
else
|
||||
wndpl->flags = 0;
|
||||
wndpl->ptMinPosition = lpPos->ptIconPos;
|
||||
wndpl->ptMaxPosition = lpPos->ptMaxPos;
|
||||
wndpl->rcNormalPosition = lpPos->rectNormal;
|
||||
|
||||
WIN_ReleaseWndPtr(pWnd);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetWindowPlacement (USER32.@)
|
||||
|
@ -1203,32 +973,35 @@ BOOL16 WINAPI GetWindowPlacement16( HWND16 hwnd, WINDOWPLACEMENT16 *wndpl )
|
|||
* Win95:
|
||||
* Fails if wndpl->length of Win95 (!) apps is invalid.
|
||||
*/
|
||||
BOOL WINAPI GetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *pwpl32 )
|
||||
BOOL WINAPI GetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *wndpl )
|
||||
{
|
||||
if( pwpl32 )
|
||||
{
|
||||
WINDOWPLACEMENT16 wpl;
|
||||
wpl.length = sizeof(wpl);
|
||||
if( GetWindowPlacement16( hwnd, &wpl ) )
|
||||
{
|
||||
pwpl32->length = sizeof(*pwpl32);
|
||||
pwpl32->flags = wpl.flags;
|
||||
pwpl32->showCmd = wpl.showCmd;
|
||||
CONV_POINT16TO32( &wpl.ptMinPosition, &pwpl32->ptMinPosition );
|
||||
CONV_POINT16TO32( &wpl.ptMaxPosition, &pwpl32->ptMaxPosition );
|
||||
CONV_RECT16TO32( &wpl.rcNormalPosition, &pwpl32->rcNormalPosition );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
WND *pWnd = WIN_FindWndPtr( hwnd );
|
||||
LPINTERNALPOS lpPos;
|
||||
|
||||
if(!pWnd ) return FALSE;
|
||||
|
||||
lpPos = WINPOS_InitInternalPos( pWnd, *(LPPOINT)&pWnd->rectWindow.left, &pWnd->rectWindow );
|
||||
wndpl->length = sizeof(*wndpl);
|
||||
if( pWnd->dwStyle & WS_MINIMIZE )
|
||||
wndpl->showCmd = SW_SHOWMINIMIZED;
|
||||
else
|
||||
wndpl->showCmd = ( pWnd->dwStyle & WS_MAXIMIZE ) ? SW_SHOWMAXIMIZED : SW_SHOWNORMAL ;
|
||||
if( pWnd->flags & WIN_RESTORE_MAX )
|
||||
wndpl->flags = WPF_RESTORETOMAXIMIZED;
|
||||
else
|
||||
wndpl->flags = 0;
|
||||
CONV_POINT16TO32( &lpPos->ptIconPos, &wndpl->ptMinPosition );
|
||||
CONV_POINT16TO32( &lpPos->ptMaxPos, &wndpl->ptMaxPosition );
|
||||
CONV_RECT16TO32( &lpPos->rectNormal, &wndpl->rcNormalPosition );
|
||||
WIN_ReleaseWndPtr(pWnd);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* WINPOS_SetPlacement
|
||||
*/
|
||||
static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT16 *wndpl,
|
||||
UINT flags )
|
||||
static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT *wndpl, UINT flags )
|
||||
{
|
||||
WND *pWnd = WIN_FindWndPtr( hwnd );
|
||||
if( pWnd )
|
||||
|
@ -1236,9 +1009,9 @@ static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT16 *wndpl,
|
|||
LPINTERNALPOS lpPos = (LPINTERNALPOS)WINPOS_InitInternalPos( pWnd,
|
||||
*(LPPOINT)&pWnd->rectWindow.left, &pWnd->rectWindow );
|
||||
|
||||
if( flags & PLACE_MIN ) lpPos->ptIconPos = wndpl->ptMinPosition;
|
||||
if( flags & PLACE_MAX ) lpPos->ptMaxPos = wndpl->ptMaxPosition;
|
||||
if( flags & PLACE_RECT) lpPos->rectNormal = wndpl->rcNormalPosition;
|
||||
if( flags & PLACE_MIN ) CONV_POINT32TO16( &wndpl->ptMinPosition, &lpPos->ptIconPos );
|
||||
if( flags & PLACE_MAX ) CONV_POINT32TO16( &wndpl->ptMaxPosition, &lpPos->ptMaxPos );
|
||||
if( flags & PLACE_RECT) CONV_RECT32TO16( &wndpl->rcNormalPosition, &lpPos->rectNormal );
|
||||
|
||||
if( pWnd->dwStyle & WS_MINIMIZE )
|
||||
{
|
||||
|
@ -1274,75 +1047,19 @@ static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT16 *wndpl,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetWindowPlacement (USER.371)
|
||||
*/
|
||||
BOOL16 WINAPI SetWindowPlacement16(HWND16 hwnd, const WINDOWPLACEMENT16 *wndpl)
|
||||
{
|
||||
return WINPOS_SetPlacement( hwnd, wndpl,
|
||||
PLACE_MIN | PLACE_MAX | PLACE_RECT );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetWindowPlacement (USER32.@)
|
||||
*
|
||||
* Win95:
|
||||
* Fails if wndpl->length of Win95 (!) apps is invalid.
|
||||
*/
|
||||
BOOL WINAPI SetWindowPlacement( HWND hwnd, const WINDOWPLACEMENT *pwpl32 )
|
||||
BOOL WINAPI SetWindowPlacement( HWND hwnd, const WINDOWPLACEMENT *wpl )
|
||||
{
|
||||
if( pwpl32 )
|
||||
{
|
||||
WINDOWPLACEMENT16 wpl;
|
||||
|
||||
wpl.length = sizeof(WINDOWPLACEMENT16);
|
||||
wpl.flags = pwpl32->flags;
|
||||
wpl.showCmd = pwpl32->showCmd;
|
||||
wpl.ptMinPosition.x = pwpl32->ptMinPosition.x;
|
||||
wpl.ptMinPosition.y = pwpl32->ptMinPosition.y;
|
||||
wpl.ptMaxPosition.x = pwpl32->ptMaxPosition.x;
|
||||
wpl.ptMaxPosition.y = pwpl32->ptMaxPosition.y;
|
||||
wpl.rcNormalPosition.left = pwpl32->rcNormalPosition.left;
|
||||
wpl.rcNormalPosition.top = pwpl32->rcNormalPosition.top;
|
||||
wpl.rcNormalPosition.right = pwpl32->rcNormalPosition.right;
|
||||
wpl.rcNormalPosition.bottom = pwpl32->rcNormalPosition.bottom;
|
||||
|
||||
return WINPOS_SetPlacement( hwnd, &wpl, PLACE_MIN | PLACE_MAX | PLACE_RECT );
|
||||
}
|
||||
return FALSE;
|
||||
if (!wpl) return FALSE;
|
||||
return WINPOS_SetPlacement( hwnd, wpl, PLACE_MIN | PLACE_MAX | PLACE_RECT );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetInternalWindowPos (USER.461)
|
||||
*/
|
||||
void WINAPI SetInternalWindowPos16( HWND16 hwnd, UINT16 showCmd,
|
||||
LPRECT16 rect, LPPOINT16 pt )
|
||||
{
|
||||
if( IsWindow16(hwnd) )
|
||||
{
|
||||
WINDOWPLACEMENT16 wndpl;
|
||||
UINT flags;
|
||||
|
||||
wndpl.length = sizeof(wndpl);
|
||||
wndpl.showCmd = showCmd;
|
||||
wndpl.flags = flags = 0;
|
||||
|
||||
if( pt )
|
||||
{
|
||||
flags |= PLACE_MIN;
|
||||
wndpl.flags |= WPF_SETMINPOSITION;
|
||||
wndpl.ptMinPosition = *pt;
|
||||
}
|
||||
if( rect )
|
||||
{
|
||||
flags |= PLACE_RECT;
|
||||
wndpl.rcNormalPosition = *rect;
|
||||
}
|
||||
WINPOS_SetPlacement( hwnd, &wndpl, flags );
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AnimateWindow (USER32.@)
|
||||
* Shows/Hides a window with an animation
|
||||
|
@ -1376,7 +1093,7 @@ void WINAPI SetInternalWindowPos( HWND hwnd, UINT showCmd,
|
|||
{
|
||||
if( IsWindow(hwnd) )
|
||||
{
|
||||
WINDOWPLACEMENT16 wndpl;
|
||||
WINDOWPLACEMENT wndpl;
|
||||
UINT flags;
|
||||
|
||||
wndpl.length = sizeof(wndpl);
|
||||
|
@ -1387,12 +1104,12 @@ void WINAPI SetInternalWindowPos( HWND hwnd, UINT showCmd,
|
|||
{
|
||||
flags |= PLACE_MIN;
|
||||
wndpl.flags |= WPF_SETMINPOSITION;
|
||||
CONV_POINT32TO16( pt, &wndpl.ptMinPosition );
|
||||
wndpl.ptMinPosition = *pt;
|
||||
}
|
||||
if( rect )
|
||||
{
|
||||
flags |= PLACE_RECT;
|
||||
CONV_RECT32TO16( rect, &wndpl.rcNormalPosition );
|
||||
wndpl.rcNormalPosition = *rect;
|
||||
}
|
||||
WINPOS_SetPlacement( hwnd, &wndpl, flags );
|
||||
}
|
||||
|
@ -1450,7 +1167,7 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
|
|||
CBTACTIVATESTRUCT cbt;
|
||||
cbt.fMouse = fMouse;
|
||||
cbt.hWndActive = hwndActive;
|
||||
if (HOOK_CallHooksA( WH_CBT, HCBT_ACTIVATE, hWnd, (LPARAM)&cbt )) goto CLEANUP_END;
|
||||
if (HOOK_CallHooksA( WH_CBT, HCBT_ACTIVATE, (WPARAM)hWnd, (LPARAM)&cbt )) goto CLEANUP_END;
|
||||
}
|
||||
|
||||
/* set prev active wnd to current active wnd and send notification */
|
||||
|
@ -1460,8 +1177,7 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
|
|||
|
||||
if (!SendMessageA( hwndPrevActive, WM_NCACTIVATE, FALSE, 0 ))
|
||||
{
|
||||
if (GetSysModalWindow16() != hWnd)
|
||||
goto CLEANUP_END;
|
||||
if (GetSysModalWindow16() != WIN_Handle16(hWnd)) goto CLEANUP_END;
|
||||
/* disregard refusal if hWnd is sysmodal */
|
||||
}
|
||||
|
||||
|
@ -1819,14 +1535,6 @@ LONG WINPOS_HandleWindowPosChanging( HWND hwnd, WINDOWPOS *winpos )
|
|||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetWindowPos (USER.232)
|
||||
*/
|
||||
BOOL16 WINAPI SetWindowPos16( HWND16 hwnd, HWND16 hwndInsertAfter,
|
||||
INT16 x, INT16 y, INT16 cx, INT16 cy, WORD flags)
|
||||
{
|
||||
return SetWindowPos(hwnd,(INT)(INT16)hwndInsertAfter,x,y,cx,cy,flags);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetWindowPos (USER32.@)
|
||||
|
@ -1847,15 +1555,6 @@ BOOL WINAPI SetWindowPos( HWND hwnd, HWND hwndInsertAfter,
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* BeginDeferWindowPos (USER.259)
|
||||
*/
|
||||
HDWP16 WINAPI BeginDeferWindowPos16( INT16 count )
|
||||
{
|
||||
return BeginDeferWindowPos( count );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* BeginDeferWindowPos (USER32.@)
|
||||
*/
|
||||
|
@ -1884,18 +1583,6 @@ HDWP WINAPI BeginDeferWindowPos( INT count )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DeferWindowPos (USER.260)
|
||||
*/
|
||||
HDWP16 WINAPI DeferWindowPos16( HDWP16 hdwp, HWND16 hwnd, HWND16 hwndAfter,
|
||||
INT16 x, INT16 y, INT16 cx, INT16 cy,
|
||||
UINT16 flags )
|
||||
{
|
||||
return DeferWindowPos( hdwp, hwnd, (INT)(INT16)hwndAfter,
|
||||
x, y, cx, cy, flags );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DeferWindowPos (USER32.@)
|
||||
*/
|
||||
|
@ -1988,15 +1675,6 @@ END:
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* EndDeferWindowPos (USER.261)
|
||||
*/
|
||||
BOOL16 WINAPI EndDeferWindowPos16( HDWP16 hdwp )
|
||||
{
|
||||
return EndDeferWindowPos( hdwp );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* EndDeferWindowPos (USER32.@)
|
||||
*/
|
||||
|
@ -2037,7 +1715,7 @@ void WINAPI CascadeChildWindows16( HWND16 parent, WORD action )
|
|||
/***********************************************************************
|
||||
* SetProgmanWindow (USER32.@)
|
||||
*/
|
||||
HRESULT WINAPI SetProgmanWindow ( HWND hwnd )
|
||||
HWND WINAPI SetProgmanWindow ( HWND hwnd )
|
||||
{
|
||||
hGlobalProgmanWindow = hwnd;
|
||||
return hGlobalProgmanWindow;
|
||||
|
@ -2046,7 +1724,7 @@ HRESULT WINAPI SetProgmanWindow ( HWND hwnd )
|
|||
/***********************************************************************
|
||||
* GetProgmanWindow (USER32.@)
|
||||
*/
|
||||
HRESULT WINAPI GetProgmanWindow ( )
|
||||
HWND WINAPI GetProgmanWindow(void)
|
||||
{
|
||||
return hGlobalProgmanWindow;
|
||||
}
|
||||
|
@ -2062,7 +1740,7 @@ HRESULT WINAPI GetProgmanWindow ( )
|
|||
* |
|
||||
* |-> ProxyTarget
|
||||
*/
|
||||
HRESULT WINAPI SetShellWindowEx ( HWND hwndProgman, HWND hwndListView )
|
||||
HWND WINAPI SetShellWindowEx ( HWND hwndProgman, HWND hwndListView )
|
||||
{
|
||||
FIXME("0x%08x 0x%08x stub\n",hwndProgman ,hwndListView );
|
||||
hGlobalShellWindow = hwndProgman;
|
||||
|
@ -2076,7 +1754,7 @@ HRESULT WINAPI SetShellWindowEx ( HWND hwndProgman, HWND hwndListView )
|
|||
* hwnd = MSTaskSwWClass
|
||||
* |-> SysTabControl32
|
||||
*/
|
||||
HRESULT WINAPI SetTaskmanWindow ( HWND hwnd )
|
||||
HWND WINAPI SetTaskmanWindow ( HWND hwnd )
|
||||
{
|
||||
hGlobalTaskmanWindow = hwnd;
|
||||
return hGlobalTaskmanWindow;
|
||||
|
@ -2085,7 +1763,7 @@ HRESULT WINAPI SetTaskmanWindow ( HWND hwnd )
|
|||
/***********************************************************************
|
||||
* GetTaskmanWindow (USER32.@)
|
||||
*/
|
||||
HRESULT WINAPI GetTaskmanWindow ( )
|
||||
{
|
||||
HWND WINAPI GetTaskmanWindow(void)
|
||||
{
|
||||
return hGlobalTaskmanWindow;
|
||||
}
|
||||
|
|
|
@ -190,7 +190,6 @@ static LRESULT WINAPI WINPROC_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
|
|||
CONTEXT86 context;
|
||||
LRESULT ret;
|
||||
WORD *args;
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
DWORD offset = 0;
|
||||
TEB *teb = NtCurrentTeb();
|
||||
int iWndsLocks;
|
||||
|
@ -199,14 +198,12 @@ static LRESULT WINAPI WINPROC_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
|
|||
|
||||
memset(&context, '\0', sizeof(context));
|
||||
context.SegDs = context.SegEs = SELECTOROF(teb->cur_stack);
|
||||
context.Eax = wndPtr ? wndPtr->hInstance : context.SegDs;
|
||||
if (!(context.Eax = GetWindowWord16( hwnd, GWL_HINSTANCE ))) context.Eax = context.SegDs;
|
||||
context.SegCs = SELECTOROF(proc);
|
||||
context.Eip = OFFSETOF(proc);
|
||||
context.Ebp = OFFSETOF(teb->cur_stack)
|
||||
+ (WORD)&((STACK16FRAME*)0)->bp;
|
||||
|
||||
WIN_ReleaseWndPtr(wndPtr);
|
||||
|
||||
if (lParam)
|
||||
{
|
||||
/* Some programs (eg. the "Undocumented Windows" examples, JWP) only
|
||||
|
@ -1059,7 +1056,7 @@ void WINPROC_UnmapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
|
|||
* Map a message from 16- to 32-bit Ansi.
|
||||
* Return value is -1 on error, 0 if OK, 1 if an UnmapMsg call is needed.
|
||||
*/
|
||||
INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
||||
INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
||||
WPARAM *pwparam32, LPARAM *plparam )
|
||||
{
|
||||
*pmsg32 = (UINT)msg16;
|
||||
|
@ -1071,18 +1068,18 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
|||
case WM_COMMAND:
|
||||
case WM_VKEYTOITEM:
|
||||
*pwparam32 = MAKEWPARAM( wParam16, HIWORD(*plparam) );
|
||||
*plparam = (LPARAM)(HWND)LOWORD(*plparam);
|
||||
*plparam = (LPARAM)WIN_Handle32( LOWORD(*plparam) );
|
||||
return 0;
|
||||
case WM_HSCROLL:
|
||||
case WM_VSCROLL:
|
||||
*pwparam32 = MAKEWPARAM( wParam16, LOWORD(*plparam) );
|
||||
*plparam = (LPARAM)(HWND)HIWORD(*plparam);
|
||||
*plparam = (LPARAM)WIN_Handle32( HIWORD(*plparam) );
|
||||
return 0;
|
||||
case WM_CTLCOLOR:
|
||||
if ( HIWORD(*plparam) > CTLCOLOR_STATIC ) return -1;
|
||||
*pmsg32 = WM_CTLCOLORMSGBOX + HIWORD(*plparam);
|
||||
*pwparam32 = (WPARAM)(HDC)wParam16;
|
||||
*plparam = (LPARAM)(HWND)LOWORD(*plparam);
|
||||
*plparam = (LPARAM)WIN_Handle32( LOWORD(*plparam) );
|
||||
return 0;
|
||||
case WM_COMPAREITEM:
|
||||
{
|
||||
|
@ -1092,7 +1089,7 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
|||
if (!cis) return -1;
|
||||
cis->CtlType = cis16->CtlType;
|
||||
cis->CtlID = cis16->CtlID;
|
||||
cis->hwndItem = cis16->hwndItem;
|
||||
cis->hwndItem = WIN_Handle32( cis16->hwndItem );
|
||||
cis->itemID1 = cis16->itemID1;
|
||||
cis->itemData1 = cis16->itemData1;
|
||||
cis->itemID2 = cis16->itemID2;
|
||||
|
@ -1109,7 +1106,7 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
|||
if (!dis) return -1;
|
||||
dis->CtlType = dis16->CtlType;
|
||||
dis->CtlID = dis16->CtlID;
|
||||
dis->hwndItem = dis16->hwndItem;
|
||||
dis->hwndItem = WIN_Handle32( dis16->hwndItem );
|
||||
dis->itemData = dis16->itemData;
|
||||
*plparam = (LPARAM)dis;
|
||||
}
|
||||
|
@ -1142,7 +1139,8 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
|||
dis->itemID = dis16->itemID;
|
||||
dis->itemAction = dis16->itemAction;
|
||||
dis->itemState = dis16->itemState;
|
||||
dis->hwndItem = dis16->hwndItem;
|
||||
dis->hwndItem = (dis->CtlType == ODT_MENU) ? (HWND)(HMENU)dis16->hwndItem
|
||||
: WIN_Handle32( dis16->hwndItem );
|
||||
dis->hDC = dis16->hDC;
|
||||
dis->itemData = dis16->itemData;
|
||||
CONV_RECT16TO32( &dis16->rcItem, &dis->rcItem );
|
||||
|
@ -1206,8 +1204,8 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
|||
case WM_MDIACTIVATE:
|
||||
if( *plparam )
|
||||
{
|
||||
*pwparam32 = (WPARAM)(HWND)HIWORD(*plparam);
|
||||
*plparam = (LPARAM)(HWND)LOWORD(*plparam);
|
||||
*pwparam32 = (WPARAM)WIN_Handle32( HIWORD(*plparam) );
|
||||
*plparam = (LPARAM)WIN_Handle32( LOWORD(*plparam) );
|
||||
}
|
||||
else /* message sent to MDI client */
|
||||
*pwparam32 = wParam16;
|
||||
|
@ -1252,7 +1250,7 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
|||
if ((wParam16 == WM_CREATE) || (wParam16 == WM_DESTROY))
|
||||
{
|
||||
*pwparam32 = MAKEWPARAM( wParam16, HIWORD(*plparam) );
|
||||
*plparam = (LPARAM)(HWND)LOWORD(*plparam);
|
||||
*plparam = (LPARAM)WIN_Handle32( LOWORD(*plparam) );
|
||||
}
|
||||
return 0;
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
|
@ -1273,12 +1271,12 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
|||
LPMSG msg32 = (LPMSG)HeapAlloc( GetProcessHeap(), 0, sizeof(MSG) );
|
||||
|
||||
if (!msg32) return -1;
|
||||
msg32->hwnd = msg16->hwnd;
|
||||
msg32->hwnd = WIN_Handle32( msg16->hwnd );
|
||||
msg32->lParam = msg16->lParam;
|
||||
msg32->time = msg16->time;
|
||||
CONV_POINT16TO32(&msg16->pt,&msg32->pt);
|
||||
/* this is right, right? */
|
||||
if (WINPROC_MapMsg16To32A(msg16->message,msg16->wParam,
|
||||
if (WINPROC_MapMsg16To32A( msg32->hwnd, msg16->message,msg16->wParam,
|
||||
&msg32->message,&msg32->wParam,
|
||||
&msg32->lParam)<0) {
|
||||
HeapFree( GetProcessHeap(), 0, msg32 );
|
||||
|
@ -1328,7 +1326,7 @@ INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
|||
*
|
||||
* Unmap a message that was mapped from 16- to 32-bit Ansi.
|
||||
*/
|
||||
LRESULT WINPROC_UnmapMsg16To32A( HWND16 hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
|
||||
LRESULT WINPROC_UnmapMsg16To32A( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
|
||||
LRESULT result )
|
||||
{
|
||||
switch(msg)
|
||||
|
@ -1420,7 +1418,7 @@ LRESULT WINPROC_UnmapMsg16To32A( HWND16 hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
|||
case WM_NEXTMENU:
|
||||
{
|
||||
MDINEXTMENU *next = (MDINEXTMENU *)lParam;
|
||||
result = MAKELONG( next->hmenuNext, next->hwndNext );
|
||||
result = MAKELONG( next->hmenuNext, WIN_Handle16(next->hwndNext) );
|
||||
HeapFree( GetProcessHeap(), 0, next );
|
||||
}
|
||||
break;
|
||||
|
@ -1435,8 +1433,8 @@ LRESULT WINPROC_UnmapMsg16To32A( HWND16 hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
|||
* Map a message from 16- to 32-bit Unicode.
|
||||
* Return value is -1 on error, 0 if OK, 1 if an UnmapMsg call is needed.
|
||||
*/
|
||||
INT WINPROC_MapMsg16To32W( HWND16 hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
||||
WPARAM *pwparam32, LPARAM *plparam )
|
||||
INT WINPROC_MapMsg16To32W( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32,
|
||||
WPARAM *pwparam32, LPARAM *plparam )
|
||||
{
|
||||
char ch;
|
||||
WCHAR wch;
|
||||
|
@ -1503,7 +1501,7 @@ INT WINPROC_MapMsg16To32W( HWND16 hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *p
|
|||
LPMSG msg32 = (LPMSG)HeapAlloc( GetProcessHeap(), 0, sizeof(MSG) );
|
||||
|
||||
if (!msg32) return -1;
|
||||
msg32->hwnd = msg16->hwnd;
|
||||
msg32->hwnd = WIN_Handle32( msg16->hwnd );
|
||||
msg32->lParam = msg16->lParam;
|
||||
msg32->time = msg16->time;
|
||||
CONV_POINT16TO32(&msg16->pt,&msg32->pt);
|
||||
|
@ -1523,7 +1521,7 @@ INT WINPROC_MapMsg16To32W( HWND16 hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *p
|
|||
ch = wParam16;
|
||||
MultiByteToWideChar( CP_ACP, 0, &ch, 1, &wch, 1);
|
||||
*pwparam32 = MAKEWPARAM( wch, HIWORD(*plparam) );
|
||||
*plparam = (LPARAM)(HWND)LOWORD(*plparam);
|
||||
*plparam = (LPARAM)WIN_Handle32( LOWORD(*plparam) );
|
||||
return 0;
|
||||
case WM_MENUCHAR:
|
||||
ch = wParam16;
|
||||
|
@ -1541,7 +1539,7 @@ INT WINPROC_MapMsg16To32W( HWND16 hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *p
|
|||
return 0;
|
||||
|
||||
default: /* No Unicode translation needed */
|
||||
return WINPROC_MapMsg16To32A( msg16, wParam16, pmsg32,
|
||||
return WINPROC_MapMsg16To32A( hwnd, msg16, wParam16, pmsg32,
|
||||
pwparam32, plparam );
|
||||
}
|
||||
}
|
||||
|
@ -1552,7 +1550,7 @@ INT WINPROC_MapMsg16To32W( HWND16 hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *p
|
|||
*
|
||||
* Unmap a message that was mapped from 16- to 32-bit Unicode.
|
||||
*/
|
||||
LRESULT WINPROC_UnmapMsg16To32W( HWND16 hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
|
||||
LRESULT WINPROC_UnmapMsg16To32W( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
|
||||
LRESULT result )
|
||||
{
|
||||
switch(msg)
|
||||
|
@ -1830,7 +1828,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
|
|||
if (!cis) return -1;
|
||||
cis->CtlType = (UINT16)cis32->CtlType;
|
||||
cis->CtlID = (UINT16)cis32->CtlID;
|
||||
cis->hwndItem = (HWND16)cis32->hwndItem;
|
||||
cis->hwndItem = WIN_Handle16( cis32->hwndItem );
|
||||
cis->itemID1 = (UINT16)cis32->itemID1;
|
||||
cis->itemData1 = cis32->itemData1;
|
||||
cis->itemID2 = (UINT16)cis32->itemID2;
|
||||
|
@ -1846,7 +1844,8 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
|
|||
dis->CtlType = (UINT16)dis32->CtlType;
|
||||
dis->CtlID = (UINT16)dis32->CtlID;
|
||||
dis->itemID = (UINT16)dis32->itemID;
|
||||
dis->hwndItem = (HWND16)dis32->hwndItem;
|
||||
dis->hwndItem = (dis->CtlType == ODT_MENU) ? (HWND16)LOWORD(dis32->hwndItem)
|
||||
: WIN_Handle16( dis32->hwndItem );
|
||||
dis->itemData = dis32->itemData;
|
||||
*plparam = (LPARAM)SEGPTR_GET(dis);
|
||||
}
|
||||
|
@ -1861,7 +1860,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
|
|||
dis->itemID = (UINT16)dis32->itemID;
|
||||
dis->itemAction = (UINT16)dis32->itemAction;
|
||||
dis->itemState = (UINT16)dis32->itemState;
|
||||
dis->hwndItem = (HWND16)dis32->hwndItem;
|
||||
dis->hwndItem = WIN_Handle16( dis32->hwndItem );
|
||||
dis->hDC = (HDC16)dis32->hDC;
|
||||
dis->itemData = dis32->itemData;
|
||||
CONV_RECT32TO16( &dis32->rcItem, &dis->rcItem );
|
||||
|
@ -1949,7 +1948,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
|
|||
}
|
||||
else
|
||||
{
|
||||
*pwparam16 = (HWND)wParam32;
|
||||
*pwparam16 = WIN_Handle16( (HWND)wParam32 );
|
||||
*plparam = 0;
|
||||
}
|
||||
return 0;
|
||||
|
@ -2027,7 +2026,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
|
|||
LPMSG16 msg16 = (LPMSG16) SEGPTR_NEW( MSG16 );
|
||||
|
||||
if (!msg16) return -1;
|
||||
msg16->hwnd = msg32->hwnd;
|
||||
msg16->hwnd = WIN_Handle16( msg32->hwnd );
|
||||
msg16->lParam = msg32->lParam;
|
||||
msg16->time = msg32->time;
|
||||
CONV_POINT32TO16(&msg32->pt,&msg16->pt);
|
||||
|
@ -2168,7 +2167,7 @@ void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
|
|||
break;
|
||||
case WM_MDIGETACTIVE:
|
||||
if (lParam) *(BOOL *)lParam = (BOOL16)HIWORD(p16->lResult);
|
||||
p16->lResult = (HWND)LOWORD(p16->lResult);
|
||||
p16->lResult = (LRESULT)WIN_Handle32( LOWORD(p16->lResult) );
|
||||
break;
|
||||
case WM_NCCALCSIZE:
|
||||
{
|
||||
|
@ -2225,7 +2224,7 @@ void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
|
|||
{
|
||||
MDINEXTMENU *next = (MDINEXTMENU *)lParam;
|
||||
next->hmenuNext = LOWORD(p16->lResult);
|
||||
next->hwndNext = HIWORD(p16->lResult);
|
||||
next->hwndNext = WIN_Handle32( HIWORD(p16->lResult) );
|
||||
p16->lResult = 0;
|
||||
}
|
||||
break;
|
||||
|
@ -2449,11 +2448,12 @@ static LRESULT WINPROC_CallProc16To32A( WNDPROC func, HWND16 hwnd,
|
|||
LRESULT result;
|
||||
UINT msg32;
|
||||
WPARAM wParam32;
|
||||
HWND hwnd32 = WIN_Handle32( hwnd );
|
||||
|
||||
if (WINPROC_MapMsg16To32A( msg, wParam, &msg32, &wParam32, &lParam ) == -1)
|
||||
if (WINPROC_MapMsg16To32A( hwnd32, msg, wParam, &msg32, &wParam32, &lParam ) == -1)
|
||||
return 0;
|
||||
result = WINPROC_CallWndProc( func, hwnd, msg32, wParam32, lParam );
|
||||
return WINPROC_UnmapMsg16To32A( hwnd, msg32, wParam32, lParam, result );
|
||||
result = WINPROC_CallWndProc( func, hwnd32, msg32, wParam32, lParam );
|
||||
return WINPROC_UnmapMsg16To32A( hwnd32, msg32, wParam32, lParam, result );
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -2482,13 +2482,12 @@ static LRESULT WINPROC_CallProc16To32W( WNDPROC func, HWND16 hwnd,
|
|||
LRESULT result;
|
||||
UINT msg32;
|
||||
WPARAM wParam32;
|
||||
HWND hwnd32 = WIN_Handle32( hwnd );
|
||||
|
||||
if (WINPROC_MapMsg16To32W( hwnd, msg, wParam, &msg32, &wParam32, &lParam ) == -1)
|
||||
if (WINPROC_MapMsg16To32W( hwnd32, msg, wParam, &msg32, &wParam32, &lParam ) == -1)
|
||||
return 0;
|
||||
|
||||
result = WINPROC_CallWndProc( func, hwnd, msg32, wParam32, lParam );
|
||||
|
||||
return WINPROC_UnmapMsg16To32W( hwnd, msg32, wParam32, lParam, result );
|
||||
result = WINPROC_CallWndProc( func, hwnd32, msg32, wParam32, lParam );
|
||||
return WINPROC_UnmapMsg16To32W( hwnd32, msg32, wParam32, lParam, result );
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -2517,10 +2516,9 @@ static LRESULT WINAPI WINPROC_CallProc32ATo16( WNDPROC16 func, HWND hwnd,
|
|||
MSGPARAM16 mp16;
|
||||
|
||||
mp16.lParam = lParam;
|
||||
if (WINPROC_MapMsg32ATo16( hwnd, msg, wParam,
|
||||
&msg16, &mp16.wParam, &mp16.lParam ) == -1)
|
||||
if (WINPROC_MapMsg32ATo16( hwnd, msg, wParam, &msg16, &mp16.wParam, &mp16.lParam ) == -1)
|
||||
return 0;
|
||||
mp16.lResult = WINPROC_CallWndProc16( func, hwnd, msg16,
|
||||
mp16.lResult = WINPROC_CallWndProc16( func, WIN_Handle16(hwnd), msg16,
|
||||
mp16.wParam, mp16.lParam );
|
||||
WINPROC_UnmapMsg32ATo16( hwnd, msg, wParam, lParam, &mp16 );
|
||||
return mp16.lResult;
|
||||
|
@ -2543,7 +2541,7 @@ static LRESULT WINAPI WINPROC_CallProc32WTo16( WNDPROC16 func, HWND hwnd,
|
|||
if (WINPROC_MapMsg32WTo16( hwnd, msg, wParam, &msg16, &mp16.wParam,
|
||||
&mp16.lParam ) == -1)
|
||||
return 0;
|
||||
mp16.lResult = WINPROC_CallWndProc16( func, hwnd, msg16,
|
||||
mp16.lResult = WINPROC_CallWndProc16( func, WIN_Handle16(hwnd), msg16,
|
||||
mp16.wParam, mp16.lParam );
|
||||
WINPROC_UnmapMsg32WTo16( hwnd, msg, wParam, lParam, &mp16 );
|
||||
return mp16.lResult;
|
||||
|
|
Loading…
Reference in New Issue