Replace some 16-bit calls by their 32-bit equivalents.
diff --git a/controls/menu.c b/controls/menu.c index 841c4b4..ff1b45d 100644 --- a/controls/menu.c +++ b/controls/menu.c
@@ -2339,7 +2339,7 @@ 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 @@ 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 @@ 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 */
diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c index 29599ca..0ceff14 100644 --- a/dlls/msvideo/msvideo_main.c +++ b/dlls/msvideo/msvideo_main.c
@@ -1161,12 +1161,12 @@ 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);
diff --git a/objects/clipping.c b/objects/clipping.c index 95c1187..97c05f8 100644 --- a/objects/clipping.c +++ b/objects/clipping.c
@@ -433,27 +433,11 @@ /*********************************************************************** * 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 @@ */ 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; }
diff --git a/objects/palette.c b/objects/palette.c index 0d2f143..c05beb2 100644 --- a/objects/palette.c +++ b/objects/palette.c
@@ -778,10 +778,14 @@ 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 @@ /********************************************************************** - * 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; }
diff --git a/windows/clipboard.c b/windows/clipboard.c index 9a4bac8..76e113b 100644 --- a/windows/clipboard.c +++ b/windows/clipboard.c
@@ -1180,9 +1180,9 @@ /************************************************************************** - * 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 @@ /************************************************************************** - * RegisterClipboardFormatA (USER32.@) + * RegisterClipboardFormat (USER.145) */ -UINT WINAPI RegisterClipboardFormatA( LPCSTR formatName ) +UINT16 WINAPI RegisterClipboardFormat16( LPCSTR FormatName ) { - return RegisterClipboardFormat16( formatName ); + return RegisterClipboardFormatA( FormatName ); }
diff --git a/windows/mdi.c b/windows/mdi.c index 07cd19c..cfad061 100644 --- a/windows/mdi.c +++ b/windows/mdi.c
@@ -2343,7 +2343,7 @@ 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; }