Replace some 16-bit calls by their 32-bit equivalents.

This commit is contained in:
Dmitry Timoshkov 2001-07-02 01:21:26 +00:00 committed by Alexandre Julliard
parent b0327f2b40
commit 56a19923e8
6 changed files with 47 additions and 47 deletions

View File

@ -2339,7 +2339,7 @@ static LRESULT MENU_DoNextMenu( MTRACKER* pmt, UINT vk )
HWND hNewWnd;
UINT id = 0;
LRESULT l = SendMessageA( pmt->hOwnerWnd, WM_NEXTMENU, vk,
(IS_SYSTEM_MENU(menu)) ? GetSubMenu16(pmt->hTopMenu,0) : pmt->hTopMenu );
(IS_SYSTEM_MENU(menu)) ? GetSubMenu(pmt->hTopMenu,0) : pmt->hTopMenu );
TRACE("%04x [%04x] -> %04x [%04x]\n",
(UINT16)pmt->hCurrentMenu, (UINT16)pmt->hOwnerWnd, LOWORD(l), HIWORD(l) );
@ -2387,7 +2387,7 @@ static LRESULT MENU_DoNextMenu( MTRACKER* pmt, UINT vk )
wndPtr = WIN_FindWndPtr(hNewWnd);
if( wndPtr->dwStyle & WS_SYSMENU &&
GetSubMenu16(wndPtr->hSysMenu, 0) == hNewMenu )
GetSubMenu(wndPtr->hSysMenu, 0) == hNewMenu )
{
/* get the real system menu */
hNewMenu = wndPtr->hSysMenu;
@ -3897,7 +3897,7 @@ HMENU WINAPI GetSystemMenu( HWND hWnd, BOOL bRevert )
if( wndPtr->hSysMenu )
{
POPUPMENU *menu;
retvalue = GetSubMenu16(wndPtr->hSysMenu, 0);
retvalue = GetSubMenu(wndPtr->hSysMenu, 0);
/* Store the dummy sysmenu handle to facilitate the refresh */
/* of the close button if the SC_CLOSE item change */

View File

@ -1161,12 +1161,12 @@ LRESULT WINAPI ICClose(HIC hic) {
WINE_HIC *whic = GlobalLock16(hic);
TRACE("(0x%08lx)\n",(DWORD)hic);
if (whic->driverproc) {
ICSendMessage16(hic,DRV_CLOSE,0,0);
ICSendMessage16(hic,DRV_DISABLE,0,0);
ICSendMessage16(hic,DRV_FREE,0,0);
ICSendMessage(hic,DRV_CLOSE,0,0);
ICSendMessage(hic,DRV_DISABLE,0,0);
ICSendMessage(hic,DRV_FREE,0,0);
} else {
CloseDriver(whic->hdrv,0,0);
}
}
GlobalUnlock16(hic);
GlobalFree16(hic);

View File

@ -433,27 +433,11 @@ BOOL WINAPI PtVisible( HDC hdc, INT x, INT y )
/***********************************************************************
* RectVisible (GDI.465)
*/
BOOL16 WINAPI RectVisible16( HDC16 hdc, const RECT16* rect )
BOOL16 WINAPI RectVisible16( HDC16 hdc, const RECT16* rect16 )
{
BOOL ret = FALSE;
RECT16 tmpRect;
DC *dc = DC_GetDCUpdate( hdc );
if (!dc) return FALSE;
TRACE("%04x %d,%dx%d,%d\n",
hdc, rect->left, rect->top, rect->right, rect->bottom );
if (dc->hGCClipRgn)
{
/* copy rectangle to avoid overwriting by LPtoDP */
tmpRect = *rect;
LPtoDP16( hdc, (LPPOINT16)&tmpRect, 2 );
tmpRect.left += dc->DCOrgX;
tmpRect.right += dc->DCOrgX;
tmpRect.top += dc->DCOrgY;
tmpRect.bottom += dc->DCOrgY;
ret = RectInRegion16( dc->hGCClipRgn, &tmpRect );
}
GDI_ReleaseObj( hdc );
return ret;
RECT rect;
CONV_RECT16TO32( rect16, &rect );
return RectVisible( hdc, &rect );
}
@ -462,9 +446,25 @@ BOOL16 WINAPI RectVisible16( HDC16 hdc, const RECT16* rect )
*/
BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
{
RECT16 rect16;
CONV_RECT32TO16( rect, &rect16 );
return RectVisible16( (HDC16)hdc, &rect16 );
BOOL ret = FALSE;
RECT tmpRect;
DC *dc = DC_GetDCUpdate( hdc );
if (!dc) return FALSE;
TRACE("%04x %d,%dx%d,%d\n",
hdc, rect->left, rect->top, rect->right, rect->bottom );
if (dc->hGCClipRgn)
{
/* copy rectangle to avoid overwriting by LPtoDP */
tmpRect = *rect;
LPtoDP( hdc, (LPPOINT)&tmpRect, 2 );
tmpRect.left += dc->DCOrgX;
tmpRect.right += dc->DCOrgX;
tmpRect.top += dc->DCOrgY;
tmpRect.bottom += dc->DCOrgY;
ret = RectInRegion( dc->hGCClipRgn, &tmpRect );
}
GDI_ReleaseObj( hdc );
return ret;
}

View File

@ -778,10 +778,14 @@ typedef HWND WINAPI (*WindowFromDC_funcptr)( HDC );
typedef BOOL WINAPI (*RedrawWindow_funcptr)( HWND, const RECT *, HRGN, UINT );
/**********************************************************************
* UpdateColors (DISPLAY.366)
* UpdateColors16 (GDI.366)
* UpdateColors [GDI32.@] Remaps current colors to logical palette
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*/
INT16 WINAPI UpdateColors16( HDC16 hDC )
BOOL WINAPI UpdateColors(
HDC hDC) /* [in] Handle of device context */
{
HMODULE mod;
DC *dc;
@ -814,16 +818,12 @@ INT16 WINAPI UpdateColors16( HDC16 hDC )
/**********************************************************************
* UpdateColors [GDI32.@] Remaps current colors to logical palette
*
* RETURNS
* Success: TRUE
* Failure: FALSE
* UpdateColors (DISPLAY.366)
* UpdateColors16 (GDI.366)
*/
BOOL WINAPI UpdateColors(
HDC hDC) /* [in] Handle of device context */
INT16 WINAPI UpdateColors16( HDC16 hDC )
{
UpdateColors16( hDC );
UpdateColors( hDC );
return TRUE;
}

View File

@ -1180,9 +1180,9 @@ UINT WINAPI EnumClipboardFormats( UINT wFormat )
/**************************************************************************
* RegisterClipboardFormat (USER.145)
* RegisterClipboardFormatA (USER32.@)
*/
UINT16 WINAPI RegisterClipboardFormat16( LPCSTR FormatName )
UINT WINAPI RegisterClipboardFormatA( LPCSTR FormatName )
{
LPWINE_CLIPFORMAT lpNewFormat;
LPWINE_CLIPFORMAT lpFormat = ClipFormats;
@ -1240,11 +1240,11 @@ UINT16 WINAPI RegisterClipboardFormat16( LPCSTR FormatName )
/**************************************************************************
* RegisterClipboardFormatA (USER32.@)
* RegisterClipboardFormat (USER.145)
*/
UINT WINAPI RegisterClipboardFormatA( LPCSTR formatName )
UINT16 WINAPI RegisterClipboardFormat16( LPCSTR FormatName )
{
return RegisterClipboardFormat16( formatName );
return RegisterClipboardFormatA( FormatName );
}

View File

@ -2343,7 +2343,7 @@ void WINAPI ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam,
newPos = maxPos;
break;
case SB_ENDSCROLL:
CalcChildScroll16(hWnd,(uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ);
CalcChildScroll(hWnd,(uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ);
return;
}