Get rid of the non-standard CONV_POINT and CONV_RECT functions.
diff --git a/controls/combo.c b/controls/combo.c
index a6f68bc..473c311 100644
--- a/controls/combo.c
+++ b/controls/combo.c
@@ -2133,9 +2133,13 @@
lParam = (LPARAM)MapSL(lParam);
if( lParam )
{
- RECT r;
- CBGetDroppedControlRect( lphc, &r );
- CONV_RECT32TO16( &r, (LPRECT16)lParam );
+ RECT r;
+ RECT16 *r16 = (RECT16 *)lParam;
+ CBGetDroppedControlRect( lphc, &r );
+ r16->left = r.left;
+ r16->top = r.top;
+ r16->right = r.right;
+ r16->bottom = r.bottom;
}
return CB_OKAY;
case CB_GETDROPPEDCONTROLRECT:
diff --git a/controls/edit.c b/controls/edit.c
index cd2b285..83fba06 100644
--- a/controls/edit.c
+++ b/controls/edit.c
@@ -460,7 +460,13 @@
case EM_GETRECT16:
if (lParam)
- CONV_RECT32TO16(&es->format_rect, MapSL(lParam));
+ {
+ RECT16 *r16 = MapSL(lParam);
+ r16->left = es->format_rect.left;
+ r16->top = es->format_rect.top;
+ r16->right = es->format_rect.right;
+ r16->bottom = es->format_rect.bottom;
+ }
break;
case EM_GETRECT:
if (lParam)
@@ -470,7 +476,11 @@
case EM_SETRECT16:
if ((es->style & ES_MULTILINE) && lParam) {
RECT rc;
- CONV_RECT16TO32(MapSL(lParam), &rc);
+ RECT16 *r16 = MapSL(lParam);
+ rc.left = r16->left;
+ rc.top = r16->top;
+ rc.right = r16->right;
+ rc.bottom = r16->bottom;
EDIT_SetRectNP(es, &rc);
EDIT_UpdateText(es, NULL, TRUE);
}
@@ -485,7 +495,11 @@
case EM_SETRECTNP16:
if ((es->style & ES_MULTILINE) && lParam) {
RECT rc;
- CONV_RECT16TO32(MapSL(lParam), &rc);
+ RECT16 *r16 = MapSL(lParam);
+ rc.left = r16->left;
+ rc.top = r16->top;
+ rc.right = r16->right;
+ rc.bottom = r16->bottom;
EDIT_SetRectNP(es, &rc);
}
break;
diff --git a/controls/listbox.c b/controls/listbox.c
index 9c422a7..0c4d39b 100644
--- a/controls/listbox.c
+++ b/controls/listbox.c
@@ -2721,8 +2721,12 @@
case LB_GETITEMRECT16:
{
RECT rect;
+ RECT16 *r16 = MapSL(lParam);
ret = LISTBOX_GetItemRect( descr, (INT16)wParam, &rect );
- CONV_RECT32TO16( &rect, MapSL(lParam) );
+ r16->left = rect.left;
+ r16->top = rect.top;
+ r16->right = rect.right;
+ r16->bottom = rect.bottom;
}
return ret;
diff --git a/dlls/commdlg/fontdlg16.c b/dlls/commdlg/fontdlg16.c
index b1ab2b3..d289ede 100644
--- a/dlls/commdlg/fontdlg16.c
+++ b/dlls/commdlg/fontdlg16.c
@@ -320,15 +320,18 @@
{
DRAWITEMSTRUCT16* dis16 = MapSL(lParam);
DRAWITEMSTRUCT dis;
- dis.CtlType = dis16->CtlType;
- dis.CtlID = dis16->CtlID;
- dis.itemID = dis16->itemID;
- dis.itemAction = dis16->itemAction;
- dis.itemState = dis16->itemState;
- dis.hwndItem = HWND_32(dis16->hwndItem);
- dis.hDC = HDC_32(dis16->hDC);
- dis.itemData = dis16->itemData;
- CONV_RECT16TO32( &dis16->rcItem, &dis.rcItem );
+ dis.CtlType = dis16->CtlType;
+ dis.CtlID = dis16->CtlID;
+ dis.itemID = dis16->itemID;
+ dis.itemAction = dis16->itemAction;
+ dis.itemState = dis16->itemState;
+ dis.hwndItem = HWND_32(dis16->hwndItem);
+ dis.hDC = HDC_32(dis16->hDC);
+ dis.itemData = dis16->itemData;
+ dis.rcItem.left = dis16->rcItem.left;
+ dis.rcItem.top = dis16->rcItem.top;
+ dis.rcItem.right = dis16->rcItem.right;
+ dis.rcItem.bottom = dis16->rcItem.bottom;
res = CFn_WMDrawItem(hDlg, wParam, (LPARAM)&dis);
}
break;
diff --git a/dlls/gdi/enhmetafile.c b/dlls/gdi/enhmetafile.c
index efe6b0c..dee64b8 100644
--- a/dlls/gdi/enhmetafile.c
+++ b/dlls/gdi/enhmetafile.c
@@ -947,13 +947,14 @@
/* NB POINTS array doesn't start at pPolyPoly->apts it's actually
pPolyPoly->aPolyCounts + pPolyPoly->nPolys */
- POINT *pts = HeapAlloc( GetProcessHeap(), 0,
- pPolyPoly->cpts * sizeof(POINT) );
+ POINT16 *pts16 = (POINT16 *)(pPolyPoly->aPolyCounts + pPolyPoly->nPolys);
+ POINT *pts = HeapAlloc( GetProcessHeap(), 0, pPolyPoly->cpts * sizeof(POINT) );
DWORD i;
for(i = 0; i < pPolyPoly->cpts; i++)
- CONV_POINT16TO32((POINT16*) (pPolyPoly->aPolyCounts +
- pPolyPoly->nPolys) + i, pts + i);
-
+ {
+ pts[i].x = pts16[i].x;
+ pts[i].y = pts16[i].y;
+ }
PolyPolygon(hdc, pts, (INT*)pPolyPoly->aPolyCounts, pPolyPoly->nPolys);
HeapFree( GetProcessHeap(), 0, pts );
break;
@@ -964,13 +965,14 @@
/* NB POINTS array doesn't start at pPolyPoly->apts it's actually
pPolyPoly->aPolyCounts + pPolyPoly->nPolys */
- POINT *pts = HeapAlloc( GetProcessHeap(), 0,
- pPolyPoly->cpts * sizeof(POINT) );
+ POINT16 *pts16 = (POINT16 *)(pPolyPoly->aPolyCounts + pPolyPoly->nPolys);
+ POINT *pts = HeapAlloc( GetProcessHeap(), 0, pPolyPoly->cpts * sizeof(POINT) );
DWORD i;
for(i = 0; i < pPolyPoly->cpts; i++)
- CONV_POINT16TO32((POINT16*) (pPolyPoly->aPolyCounts +
- pPolyPoly->nPolys) + i, pts + i);
-
+ {
+ pts[i].x = pts16[i].x;
+ pts[i].y = pts16[i].y;
+ }
PolyPolyline(hdc, pts, pPolyPoly->aPolyCounts, pPolyPoly->nPolys);
HeapFree( GetProcessHeap(), 0, pts );
break;
diff --git a/dlls/gdi/gdi16.c b/dlls/gdi/gdi16.c
index 3a9eba3..a1f8f34 100644
--- a/dlls/gdi/gdi16.c
+++ b/dlls/gdi/gdi16.c
@@ -486,7 +486,11 @@
count*sizeof(POINT) );
if (!pt32) return FALSE;
- for (i=count;i--;) CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
+ for (i=count;i--;)
+ {
+ pt32[i].x = pt[i].x;
+ pt32[i].y = pt[i].y;
+ }
ret = Polygon(HDC_32(hdc),pt32,count);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
@@ -504,7 +508,11 @@
count*sizeof(POINT) );
if (!pt32) return FALSE;
- for (i=count;i--;) CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
+ for (i=count;i--;)
+ {
+ pt32[i].x = pt[i].x;
+ pt32[i].y = pt[i].y;
+ }
ret = Polyline(HDC_32(hdc),pt32,count);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
@@ -1414,7 +1422,10 @@
{
RECT r;
INT16 ret = GetRgnBox( HRGN_32(hrgn), &r );
- CONV_RECT32TO16( &r, rect );
+ rect->left = r.left;
+ rect->top = r.top;
+ rect->right = r.right;
+ rect->bottom = r.bottom;
return ret;
}
@@ -1554,7 +1565,10 @@
if (rect)
{
RECT rect32;
- CONV_RECT16TO32( rect, &rect32 );
+ rect32.left = rect->left;
+ rect32.top = rect->top;
+ rect32.right = rect->right;
+ rect32.bottom = rect->bottom;
return SetBoundsRect( HDC_32( hdc ), &rect32, flags );
}
else return SetBoundsRect( HDC_32( hdc ), NULL, flags );
@@ -1568,7 +1582,13 @@
{
RECT rect32;
UINT ret = GetBoundsRect( HDC_32( hdc ), &rect32, flags );
- if (rect) CONV_RECT32TO16( &rect32, rect );
+ if (rect)
+ {
+ rect->left = rect32.left;
+ rect->top = rect32.top;
+ rect->right = rect32.right;
+ rect->bottom = rect32.bottom;
+ }
return ret;
}
@@ -1842,7 +1862,13 @@
if(lpdx32 == NULL) return FALSE;
for (i=count;i--;) lpdx32[i]=lpDx[i];
}
- if (lprect) CONV_RECT16TO32(lprect,&rect32);
+ if (lprect)
+ {
+ rect32.left = lprect->left;
+ rect32.top = lprect->top;
+ rect32.right = lprect->right;
+ rect32.bottom = lprect->bottom;
+ }
ret = ExtTextOutA(HDC_32(hdc),x,y,flags,lprect?&rect32:NULL,str,count,lpdx32);
if (lpdx32) HeapFree( GetProcessHeap(), 0, lpdx32 );
return ret;
@@ -2202,7 +2228,10 @@
pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0, sizeof(POINT)*nrpts);
if(pt32 == NULL) return FALSE;
for (i=nrpts;i--;)
- CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
+ {
+ pt32[i].x = pt[i].x;
+ pt32[i].y = pt[i].y;
+ }
counts32 = (LPINT)HeapAlloc( GetProcessHeap(), 0, polygons*sizeof(INT) );
if(counts32 == NULL) {
HeapFree( GetProcessHeap(), 0, pt32 );
@@ -2230,7 +2259,11 @@
for (i = 0; i < nbpolygons; i++) npts += count[i];
points32 = HeapAlloc( GetProcessHeap(), 0, npts * sizeof(POINT) );
- for (i = 0; i < npts; i++) CONV_POINT16TO32( &(points[i]), &(points32[i]) );
+ for (i = 0; i < npts; i++)
+ {
+ points32[i].x = points[i].x;
+ points32[i].y = points[i].y;
+ }
count32 = HeapAlloc( GetProcessHeap(), 0, nbpolygons * sizeof(INT) );
for (i = 0; i < nbpolygons; i++) count32[i] = count[i];
@@ -2257,7 +2290,11 @@
BOOL16 WINAPI RectVisible16( HDC16 hdc, const RECT16* rect16 )
{
RECT rect;
- CONV_RECT16TO32( rect16, &rect );
+
+ rect.left = rect16->left;
+ rect.top = rect16->top;
+ rect.right = rect16->right;
+ rect.bottom = rect16->bottom;
return RectVisible( HDC_32(hdc), &rect );
}
@@ -2270,7 +2307,10 @@
{
RECT r32;
- CONV_RECT16TO32(rect, &r32);
+ r32.left = rect->left;
+ r32.top = rect->top;
+ r32.right = rect->right;
+ r32.bottom = rect->bottom;
return RectInRegion( HRGN_32(hrgn), &r32 );
}
@@ -2398,7 +2438,11 @@
{
POINT pt32;
BOOL16 ret = OffsetViewportOrgEx( HDC_32(hdc), x, y, &pt32 );
- if (pt) CONV_POINT32TO16( &pt32, pt );
+ if (pt)
+ {
+ pt->x = pt32.x;
+ pt->y = pt32.y;
+ }
return ret;
}
@@ -2410,7 +2454,11 @@
{
POINT pt32;
BOOL16 ret = OffsetWindowOrgEx( HDC_32(hdc), x, y, &pt32 );
- if (pt) CONV_POINT32TO16( &pt32, pt );
+ if (pt)
+ {
+ pt->x = pt32.x;
+ pt->y = pt32.y;
+ }
return ret;
}
@@ -2451,7 +2499,11 @@
{
POINT pt32;
BOOL16 ret = SetViewportOrgEx( HDC_32(hdc), x, y, &pt32 );
- if (pt) CONV_POINT32TO16( &pt32, pt );
+ if (pt)
+ {
+ pt->x = pt32.x;
+ pt->y = pt32.y;
+ }
return ret;
}
@@ -2475,7 +2527,11 @@
{
POINT pt32;
BOOL16 ret = SetWindowOrgEx( HDC_32(hdc), x, y, &pt32 );
- if (pt) CONV_POINT32TO16( &pt32, pt );
+ if (pt)
+ {
+ pt->x = pt32.x;
+ pt->y = pt32.y;
+ }
return ret;
}
@@ -2488,7 +2544,11 @@
POINT pt32;
if (!MoveToEx( HDC_32(hdc), x, y, &pt32 )) return FALSE;
- if (pt) CONV_POINT32TO16( &pt32, pt );
+ if (pt)
+ {
+ pt->x = pt32.x;
+ pt->y = pt32.y;
+ }
return TRUE;
}
@@ -2531,7 +2591,11 @@
LPPOINT pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0,
cPoints*sizeof(POINT) );
if(!pt32) return FALSE;
- for (i=cPoints;i--;) CONV_POINT16TO32(&(lppt[i]),&(pt32[i]));
+ for (i=cPoints;i--;)
+ {
+ pt32[i].x = lppt[i].x;
+ pt32[i].y = lppt[i].y;
+ }
ret= PolyBezier(HDC_32(hdc), pt32, cPoints);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
@@ -2548,7 +2612,11 @@
LPPOINT pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0,
cPoints*sizeof(POINT) );
if(!pt32) return FALSE;
- for (i=cPoints;i--;) CONV_POINT16TO32(&(lppt[i]),&(pt32[i]));
+ for (i=cPoints;i--;)
+ {
+ pt32[i].x = lppt[i].x;
+ pt32[i].y = lppt[i].y;
+ }
ret= PolyBezierTo(HDC_32(hdc), pt32, cPoints);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
diff --git a/dlls/gdi/mfdrv/graphics.c b/dlls/gdi/mfdrv/graphics.c
index 4442c22..933d8ff 100644
--- a/dlls/gdi/mfdrv/graphics.c
+++ b/dlls/gdi/mfdrv/graphics.c
@@ -156,7 +156,11 @@
pt16 = (LPPOINT16)HeapAlloc( GetProcessHeap(), 0, sizeof(POINT16)*count );
if(!pt16) return FALSE;
- for (i=count;i--;) CONV_POINT32TO16(&(pt[i]),&(pt16[i]));
+ for (i=count;i--;)
+ {
+ pt16[i].x = pt[i].x;
+ pt16[i].y = pt[i].y;
+ }
ret = MFDRV_MetaPoly(dev, META_POLYLINE, pt16, count);
HeapFree( GetProcessHeap(), 0, pt16 );
@@ -176,7 +180,11 @@
pt16 = (LPPOINT16) HeapAlloc( GetProcessHeap(), 0, sizeof(POINT16)*count );
if(!pt16) return FALSE;
- for (i=count;i--;) CONV_POINT32TO16(&(pt[i]),&(pt16[i]));
+ for (i=count;i--;)
+ {
+ pt16[i].x = pt[i].x;
+ pt16[i].y = pt[i].y;
+ }
ret = MFDRV_MetaPoly(dev, META_POLYGON, pt16, count);
HeapFree( GetProcessHeap(), 0, pt16 );
@@ -215,7 +223,8 @@
/* convert all points */
for (j = totalpoint16; j--;){
- CONV_POINT32TO16(&(pt[j]),&(pt16[j]));
+ pt16[j].x = pt[j].x;
+ pt16[j].y = pt[j].y;
}
len = sizeof(METARECORD) + sizeof(WORD) + polygons*sizeof(INT16) + totalpoint16*sizeof(POINT16);
diff --git a/dlls/gdi/mfdrv/text.c b/dlls/gdi/mfdrv/text.c
index 6ddbfd9..738079c 100644
--- a/dlls/gdi/mfdrv/text.c
+++ b/dlls/gdi/mfdrv/text.c
@@ -130,7 +130,13 @@
TRACE("mapped %s -> %s\n", debugstr_wn(str, count), debugstr_an(ascii, len));
- if (lprect) CONV_RECT32TO16(lprect,&rect16);
+ if (lprect)
+ {
+ rect16.left = lprect->left;
+ rect16.top = lprect->top;
+ rect16.right = lprect->right;
+ rect16.bottom = lprect->bottom;
+ }
if(lpDx) {
lpdx16 = HeapAlloc( GetProcessHeap(), 0, sizeof(INT16)*len );
diff --git a/dlls/gdi/pen.c b/dlls/gdi/pen.c
index f15cc44..ac7817d 100644
--- a/dlls/gdi/pen.c
+++ b/dlls/gdi/pen.c
@@ -156,7 +156,8 @@
logpen.lopnStyle = pen->logpen.lopnStyle;
logpen.lopnColor = pen->logpen.lopnColor;
- CONV_POINT32TO16( &pen->logpen.lopnWidth, &logpen.lopnWidth );
+ logpen.lopnWidth.x = pen->logpen.lopnWidth.x;
+ logpen.lopnWidth.y = pen->logpen.lopnWidth.y;
if (count > sizeof(logpen)) count = sizeof(logpen);
memcpy( buffer, &logpen, count );
return count;
diff --git a/dlls/user/hook16.c b/dlls/user/hook16.c
index a2e7a0a..8bcef5c 100644
--- a/dlls/user/hook16.c
+++ b/dlls/user/hook16.c
@@ -283,7 +283,10 @@
RECT *rect32 = (RECT *)lp;
RECT16 rect16;
- CONV_RECT32TO16( rect32, &rect16 );
+ rect16.left = rect32->left;
+ rect16.top = rect32->top;
+ rect16.right = rect32->right;
+ rect16.bottom = rect32->bottom;
lp = MapLS( &rect16 );
ret = call_hook_16( WH_CBT, code, wp, lp );
UnMapLS( lp );
@@ -571,7 +574,10 @@
RECT16 *rect16 = MapSL(lparam);
RECT rect32;
- CONV_RECT16TO32( rect16, &rect32 );
+ rect32.left = rect16->left;
+ rect32.top = rect16->top;
+ rect32.right = rect16->right;
+ rect32.bottom = rect16->bottom;
ret = CallNextHookEx( hhook, code, wparam, (LPARAM)&rect32 );
break;
}
diff --git a/dlls/user/user16.c b/dlls/user/user16.c
index 486fd51..debca1b 100644
--- a/dlls/user/user16.c
+++ b/dlls/user/user16.c
@@ -97,6 +97,23 @@
return LOWORD(ret);
}
+
+/***********************************************************************
+ * ClipCursor (USER.16)
+ */
+BOOL16 WINAPI ClipCursor16( const RECT16 *rect )
+{
+ RECT rect32;
+
+ if (!rect) return ClipCursor( NULL );
+ rect32.left = rect->left;
+ rect32.top = rect->top;
+ rect32.right = rect->right;
+ rect32.bottom = rect->bottom;
+ return ClipCursor( &rect32 );
+}
+
+
/***********************************************************************
* SetCursor (USER.69)
*/
@@ -153,7 +170,11 @@
INT16 WINAPI FrameRect16( HDC16 hdc, const RECT16 *rect16, HBRUSH16 hbrush )
{
RECT rect;
- CONV_RECT16TO32( rect16, &rect );
+
+ rect.left = rect16->left;
+ rect.top = rect16->top;
+ rect.right = rect16->right;
+ rect.bottom = rect16->bottom;
return FrameRect( HDC_32(hdc), &rect, HBRUSH_32(hbrush) );
}
@@ -177,9 +198,16 @@
if (rect)
{
RECT rect32;
- CONV_RECT16TO32( rect, &rect32 );
+
+ rect32.left = rect->left;
+ rect32.top = rect->top;
+ rect32.right = rect->right;
+ rect32.bottom = rect->bottom;
ret = DrawTextA( HDC_32(hdc), str, count, &rect32, flags );
- CONV_RECT32TO16( &rect32, rect );
+ rect->left = rect32.left;
+ rect->top = rect32.top;
+ rect->right = rect32.right;
+ rect->bottom = rect32.bottom;
}
else ret = DrawTextA( HDC_32(hdc), str, count, NULL, flags);
return ret;
@@ -197,6 +225,15 @@
}
+/***********************************************************************
+ * AdjustWindowRect (USER.102)
+ */
+BOOL16 WINAPI AdjustWindowRect16( LPRECT16 rect, DWORD style, BOOL16 menu )
+{
+ return AdjustWindowRectEx16( rect, style, menu, 0 );
+}
+
+
/**********************************************************************
* CreateMenu (USER.151)
*/
@@ -400,12 +437,30 @@
RECT rect32, clipRect32, rcUpdate32;
BOOL16 ret;
- if (rect) CONV_RECT16TO32( rect, &rect32 );
- if (cliprc) CONV_RECT16TO32( cliprc, &clipRect32 );
+ if (rect)
+ {
+ rect32.left = rect->left;
+ rect32.top = rect->top;
+ rect32.right = rect->right;
+ rect32.bottom = rect->bottom;
+ }
+ if (cliprc)
+ {
+ clipRect32.left = cliprc->left;
+ clipRect32.top = cliprc->top;
+ clipRect32.right = cliprc->right;
+ clipRect32.bottom = cliprc->bottom;
+ }
ret = ScrollDC( HDC_32(hdc), dx, dy, rect ? &rect32 : NULL,
cliprc ? &clipRect32 : NULL, HRGN_32(hrgnUpdate),
&rcUpdate32 );
- if (rcUpdate) CONV_RECT32TO16( &rcUpdate32, rcUpdate );
+ if (rcUpdate)
+ {
+ rcUpdate->left = rcUpdate32.left;
+ rcUpdate->top = rcUpdate32.top;
+ rcUpdate->right = rcUpdate32.right;
+ rcUpdate->bottom = rcUpdate32.bottom;
+ }
return ret;
}
@@ -505,6 +560,23 @@
/***********************************************************************
+ * GetClipCursor (USER.309)
+ */
+void WINAPI GetClipCursor16( RECT16 *rect )
+{
+ if (rect)
+ {
+ RECT rect32;
+ GetClipCursor( &rect32 );
+ rect->left = rect32.left;
+ rect->top = rect32.top;
+ rect->right = rect32.right;
+ rect->bottom = rect32.bottom;
+ }
+}
+
+
+/***********************************************************************
* SignalProc (USER.314)
*/
void WINAPI SignalProc16( HANDLE16 hModule, UINT16 code,
@@ -759,6 +831,28 @@
width, height, cFlag));
}
+
+/***********************************************************************
+ * AdjustWindowRectEx (USER.454)
+ */
+BOOL16 WINAPI AdjustWindowRectEx16( LPRECT16 rect, DWORD style, BOOL16 menu, DWORD exStyle )
+{
+ RECT rect32;
+ BOOL ret;
+
+ rect32.left = rect->left;
+ rect32.top = rect->top;
+ rect32.right = rect->right;
+ rect32.bottom = rect->bottom;
+ ret = AdjustWindowRectEx( &rect32, style, menu, exStyle );
+ rect->left = rect32.left;
+ rect->top = rect32.top;
+ rect->right = rect32.right;
+ rect->bottom = rect32.bottom;
+ return ret;
+}
+
+
/***********************************************************************
* DestroyIcon (USER.457)
*/
@@ -924,7 +1018,11 @@
void WINAPI DrawFocusRect16( HDC16 hdc, const RECT16* rc )
{
RECT rect32;
- CONV_RECT16TO32( rc, &rect32 );
+
+ rect32.left = rc->left;
+ rect32.top = rc->top;
+ rect32.right = rc->right;
+ rect32.bottom = rc->bottom;
DrawFocusRect( HDC_32(hdc), &rect32 );
}
@@ -937,9 +1035,15 @@
RECT rect32;
BOOL ret;
- CONV_RECT16TO32( rc, &rect32 );
+ rect32.left = rc->left;
+ rect32.top = rc->top;
+ rect32.right = rc->right;
+ rect32.bottom = rc->bottom;
ret = DrawFrameControl( HDC_32(hdc), &rect32, uType, uState );
- CONV_RECT32TO16( &rect32, rc );
+ rc->left = rect32.left;
+ rc->top = rect32.top;
+ rc->right = rect32.right;
+ rc->bottom = rect32.bottom;
return ret;
}
@@ -951,9 +1055,15 @@
RECT rect32;
BOOL ret;
- CONV_RECT16TO32( rc, &rect32 );
+ rect32.left = rc->left;
+ rect32.top = rc->top;
+ rect32.right = rc->right;
+ rect32.bottom = rc->bottom;
ret = DrawEdge( HDC_32(hdc), &rect32, edge, flags );
- CONV_RECT32TO16( &rect32, rc );
+ rc->left = rect32.left;
+ rc->top = rect32.top;
+ rc->right = rect32.right;
+ rc->bottom = rect32.bottom;
return ret;
}
diff --git a/dlls/user/wnd16.c b/dlls/user/wnd16.c
index 17a8bbe..15ca5d5 100644
--- a/dlls/user/wnd16.c
+++ b/dlls/user/wnd16.c
@@ -164,7 +164,8 @@
{
POINT pt32;
- CONV_POINT16TO32( &pt, &pt32 );
+ pt32.x = pt.x;
+ pt32.y = pt.y;
return HWND_16( WindowFromPoint( pt32 ) );
}
@@ -447,8 +448,20 @@
{
RECT rect32, clipRect32;
- if (rect) CONV_RECT16TO32( rect, &rect32 );
- if (clipRect) CONV_RECT16TO32( clipRect, &clipRect32 );
+ if (rect)
+ {
+ rect32.left = rect->left;
+ rect32.top = rect->top;
+ rect32.right = rect->right;
+ rect32.bottom = rect->bottom;
+ }
+ if (clipRect)
+ {
+ clipRect32.left = clipRect->left;
+ clipRect32.top = clipRect->top;
+ clipRect32.right = clipRect->right;
+ clipRect32.bottom = clipRect->bottom;
+ }
ScrollWindow( WIN_Handle32(hwnd), dx, dy, rect ? &rect32 : NULL,
clipRect ? &clipRect32 : NULL );
}
@@ -846,7 +859,10 @@
if (!rect) return GetUpdateRect( WIN_Handle32(hwnd), NULL, erase );
ret = GetUpdateRect( WIN_Handle32(hwnd), &r, erase );
- CONV_RECT32TO16( &r, rect );
+ rect->left = r.left;
+ rect->top = r.top;
+ rect->right = r.right;
+ rect->bottom = r.bottom;
return ret;
}
@@ -857,7 +873,9 @@
HWND16 WINAPI ChildWindowFromPoint16( HWND16 hwndParent, POINT16 pt )
{
POINT pt32;
- CONV_POINT16TO32( &pt, &pt32 );
+
+ pt32.x = pt.x;
+ pt32.y = pt.y;
return HWND_16( ChildWindowFromPoint( WIN_Handle32(hwndParent), pt32 ));
}
@@ -1085,7 +1103,10 @@
if (rectUpdate)
{
RECT r;
- CONV_RECT16TO32( rectUpdate, &r );
+ r.left = rectUpdate->left;
+ r.top = rectUpdate->top;
+ r.right = rectUpdate->right;
+ r.bottom = rectUpdate->bottom;
return RedrawWindow(WIN_Handle32(hwnd), &r, HRGN_32(hrgnUpdate), flags);
}
return RedrawWindow(WIN_Handle32(hwnd), NULL, HRGN_32(hrgnUpdate), flags);
@@ -1112,12 +1133,30 @@
RECT rect32, clipRect32, rcUpdate32;
BOOL16 ret;
- if (rect) CONV_RECT16TO32( rect, &rect32 );
- if (clipRect) CONV_RECT16TO32( clipRect, &clipRect32 );
+ if (rect)
+ {
+ rect32.left = rect->left;
+ rect32.top = rect->top;
+ rect32.right = rect->right;
+ rect32.bottom = rect->bottom;
+ }
+ if (clipRect)
+ {
+ clipRect32.left = clipRect->left;
+ clipRect32.top = clipRect->top;
+ clipRect32.right = clipRect->right;
+ clipRect32.bottom = clipRect->bottom;
+ }
ret = ScrollWindowEx( WIN_Handle32(hwnd), dx, dy, rect ? &rect32 : NULL,
clipRect ? &clipRect32 : NULL, HRGN_32(hrgnUpdate),
(rcUpdate) ? &rcUpdate32 : NULL, flags );
- if (rcUpdate) CONV_RECT32TO16( &rcUpdate32, rcUpdate );
+ if (rcUpdate)
+ {
+ rcUpdate->left = rcUpdate32.left;
+ rcUpdate->top = rcUpdate32.top;
+ rcUpdate->right = rcUpdate32.right;
+ rcUpdate->bottom = rcUpdate32.bottom;
+ }
return ret;
}
@@ -1131,7 +1170,10 @@
RECT16 rc16;
GetClientRect( WIN_Handle32(hwnd), &rect );
DPtoLP( HDC_32(hdc), (LPPOINT)&rect, 2 );
- CONV_RECT32TO16( &rect, &rc16 );
+ rc16.left = rect.left;
+ rc16.top = rect.top;
+ rc16.right = rect.right;
+ rc16.bottom = rect.bottom;
PaintRect16( hwndParent, hwnd, hdc, hbrush, &rc16 );
}
@@ -1193,9 +1235,14 @@
wp16->length = sizeof(*wp16);
wp16->flags = wpl.flags;
wp16->showCmd = wpl.showCmd;
- CONV_POINT32TO16( &wpl.ptMinPosition, &wp16->ptMinPosition );
- CONV_POINT32TO16( &wpl.ptMaxPosition, &wp16->ptMaxPosition );
- CONV_RECT32TO16( &wpl.rcNormalPosition, &wp16->rcNormalPosition );
+ wp16->ptMinPosition.x = wpl.ptMinPosition.x;
+ wp16->ptMinPosition.y = wpl.ptMinPosition.y;
+ wp16->ptMaxPosition.x = wpl.ptMaxPosition.x;
+ wp16->ptMaxPosition.y = wpl.ptMaxPosition.y;
+ wp16->rcNormalPosition.left = wpl.rcNormalPosition.left;
+ wp16->rcNormalPosition.top = wpl.rcNormalPosition.top;
+ wp16->rcNormalPosition.right = wpl.rcNormalPosition.right;
+ wp16->rcNormalPosition.bottom = wpl.rcNormalPosition.bottom;
return TRUE;
}
@@ -1229,7 +1276,9 @@
HWND16 WINAPI ChildWindowFromPointEx16( HWND16 hwndParent, POINT16 pt, UINT16 uFlags)
{
POINT pt32;
- CONV_POINT16TO32( &pt, &pt32 );
+
+ pt32.x = pt.x;
+ pt32.y = pt.y;
return HWND_16( ChildWindowFromPointEx( WIN_Handle32(hwndParent), pt32, uFlags ));
}
@@ -1254,7 +1303,13 @@
INT16 nReserved, HWND16 hwnd, const RECT16 *lpRect )
{
RECT r;
- if (lpRect) CONV_RECT16TO32( lpRect, &r );
+ if (lpRect)
+ {
+ r.left = lpRect->left;
+ r.top = lpRect->top;
+ r.right = lpRect->right;
+ r.bottom = lpRect->bottom;
+ }
return TrackPopupMenu( HMENU_32(hMenu), wFlags, x, y, nReserved,
WIN_Handle32(hwnd), lpRect ? &r : NULL );
}
@@ -1446,7 +1501,9 @@
BOOL16 WINAPI DragDetect16( HWND16 hwnd, POINT16 pt )
{
POINT pt32;
- CONV_POINT16TO32( &pt, &pt32 );
+
+ pt32.x = pt.x;
+ pt32.y = pt.y;
return DragDetect( WIN_Handle32(hwnd), pt32 );
}
@@ -1513,8 +1570,13 @@
{
RECT rect32;
- if (rect) CONV_RECT16TO32(rect,&rect32);
-
+ if (rect)
+ {
+ rect32.left = rect->left;
+ rect32.top = rect->top;
+ rect32.right = rect->right;
+ rect32.bottom = rect->bottom;
+ }
return DrawCaptionTempA( WIN_Handle32(hwnd), HDC_32(hdc),
rect ? &rect32 : NULL, HFONT_32(hFont),
HICON_32(hIcon), str, uFlags & 0x1f );
@@ -1528,8 +1590,13 @@
{
RECT rect32;
- if (rect) CONV_RECT16TO32( rect, &rect32 );
-
+ if (rect)
+ {
+ rect32.left = rect->left;
+ rect32.top = rect->top;
+ rect32.right = rect->right;
+ rect32.bottom = rect->bottom;
+ }
return DrawCaption(WIN_Handle32(hwnd), HDC_32(hdc), rect ? &rect32 : NULL, flags);
}
@@ -1544,7 +1611,10 @@
BOOL res;
if (!rect) return FALSE;
res = GetMenuItemRect( WIN_Handle32(hwnd), HMENU_32(hMenu), uItem, &r32 );
- CONV_RECT32TO16( &r32, rect );
+ rect->left = r32.left;
+ rect->top = r32.top;
+ rect->right = r32.right;
+ rect->bottom = r32.bottom;
return res;
}
diff --git a/include/wine/wingdi16.h b/include/wine/wingdi16.h
index f2b4955..6e0fec6 100644
--- a/include/wine/wingdi16.h
+++ b/include/wine/wingdi16.h
@@ -617,33 +617,4 @@
INT16 WINAPI WriteDialog16(HPJOB16,LPSTR,INT16);
INT16 WINAPI WriteSpool16(HPJOB16,LPSTR,INT16);
-
-inline static void CONV_POINT16TO32( const POINT16 *p16, POINT *p32 )
-{
- p32->x = p16->x;
- p32->y = p16->y;
-}
-
-inline static void CONV_POINT32TO16( const POINT *p32, POINT16 *p16 )
-{
- p16->x = (INT16)p32->x;
- p16->y = (INT16)p32->y;
-}
-
-inline static void CONV_RECT16TO32( const RECT16 *r16, RECT *r32 )
-{
- r32->left = r16->left;
- r32->top = r16->top;
- r32->right = r16->right;
- r32->bottom = r16->bottom;
-}
-
-inline static void CONV_RECT32TO16( const RECT *r32, RECT16 *r16 )
-{
- r16->left = (INT16)r32->left;
- r16->top = (INT16)r32->top;
- r16->right = (INT16)r32->right;
- r16->bottom = (INT16)r32->bottom;
-}
-
#endif /* __WINE_WINE_WINGDI16_H */
diff --git a/windows/cursoricon.c b/windows/cursoricon.c
index ded5ab5..c5bc5f8 100644
--- a/windows/cursoricon.c
+++ b/windows/cursoricon.c
@@ -1411,17 +1411,6 @@
/***********************************************************************
- * ClipCursor (USER.16)
- */
-BOOL16 WINAPI ClipCursor16( const RECT16 *rect )
-{
- if (!rect) SetRectEmpty( &CURSOR_ClipRect );
- else CONV_RECT16TO32( rect, &CURSOR_ClipRect );
- return TRUE;
-}
-
-
-/***********************************************************************
* ClipCursor (USER32.@)
*/
BOOL WINAPI ClipCursor( const RECT *rect )
@@ -1433,15 +1422,6 @@
/***********************************************************************
- * GetClipCursor (USER.309)
- */
-void WINAPI GetClipCursor16( RECT16 *rect )
-{
- if (rect) CONV_RECT32TO16( &CURSOR_ClipRect, rect );
-}
-
-
-/***********************************************************************
* GetClipCursor (USER32.@)
*/
BOOL WINAPI GetClipCursor( RECT *rect )
diff --git a/windows/defwnd.c b/windows/defwnd.c
index ac4882e..1cf5590 100644
--- a/windows/defwnd.c
+++ b/windows/defwnd.c
@@ -742,9 +742,17 @@
case WM_NCCALCSIZE:
{
RECT rect32;
- CONV_RECT16TO32( MapSL(lParam), &rect32 );
+ RECT16 *rect16 = MapSL(lParam);
+
+ rect32.left = rect16->left;
+ rect32.top = rect16->top;
+ rect32.right = rect16->right;
+ rect32.bottom = rect16->bottom;
result = NC_HandleNCCalcSize( hwnd, &rect32 );
- CONV_RECT32TO16( &rect32, MapSL(lParam) );
+ rect16->left = rect32.left;
+ rect16->top = rect32.top;
+ rect16->right = rect32.right;
+ rect16->bottom = rect32.bottom;
}
break;
diff --git a/windows/nonclient.c b/windows/nonclient.c
index 4b6ac9c..edc671a 100644
--- a/windows/nonclient.c
+++ b/windows/nonclient.c
@@ -337,15 +337,6 @@
/***********************************************************************
- * AdjustWindowRect (USER.102)
- */
-BOOL16 WINAPI AdjustWindowRect16( LPRECT16 rect, DWORD style, BOOL16 menu )
-{
- return AdjustWindowRectEx16( rect, style, menu, 0 );
-}
-
-
-/***********************************************************************
* AdjustWindowRect (USER32.@)
*/
BOOL WINAPI AdjustWindowRect( LPRECT rect, DWORD style, BOOL menu )
@@ -355,22 +346,6 @@
/***********************************************************************
- * AdjustWindowRectEx (USER.454)
- */
-BOOL16 WINAPI AdjustWindowRectEx16( LPRECT16 rect, DWORD style,
- BOOL16 menu, DWORD exStyle )
-{
- RECT rect32;
- BOOL ret;
-
- CONV_RECT16TO32( rect, &rect32 );
- ret = AdjustWindowRectEx( &rect32, style, menu, exStyle );
- CONV_RECT32TO16( &rect32, rect );
- return ret;
-}
-
-
-/***********************************************************************
* AdjustWindowRectEx (USER32.@)
*/
BOOL WINAPI AdjustWindowRectEx( LPRECT rect, DWORD style, BOOL menu, DWORD exStyle )
diff --git a/windows/sysparams.c b/windows/sysparams.c
index bd67261..5a86bf5 100644
--- a/windows/sysparams.c
+++ b/windows/sysparams.c
@@ -2223,7 +2223,13 @@
RECT tmp;
ret = SystemParametersInfoA( uAction, uParam, lpvParam ? &tmp : NULL, fuWinIni );
if (ret && lpvParam)
- CONV_RECT32TO16( &tmp, (RECT16 *)lpvParam );
+ {
+ RECT16 *r16 = (RECT16 *)lpvParam;
+ r16->left = tmp.left;
+ r16->top = tmp.top;
+ r16->right = tmp.right;
+ r16->bottom = tmp.bottom;
+ }
break;
}
diff --git a/windows/winpos.c b/windows/winpos.c
index 5908de9..3e0f8f6 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -642,17 +642,31 @@
SetPropA( wnd->hwndSelf, atomInternalPos, (HANDLE)lpPos );
lpPos->hwndIconTitle = 0; /* defer until needs to be shown */
- CONV_RECT32TO16( &wnd->rectWindow, &lpPos->rectNormal );
- *(UINT*)&lpPos->ptIconPos = *(UINT*)&lpPos->ptMaxPos = 0xFFFFFFFF;
+ lpPos->rectNormal.left = wnd->rectWindow.left;
+ lpPos->rectNormal.top = wnd->rectWindow.top;
+ lpPos->rectNormal.right = wnd->rectWindow.right;
+ lpPos->rectNormal.bottom = wnd->rectWindow.bottom;
+ lpPos->ptIconPos.x = lpPos->ptIconPos.y = -1;
+ lpPos->ptMaxPos.x = lpPos->ptMaxPos.y = -1;
}
if( wnd->dwStyle & WS_MINIMIZE )
- CONV_POINT32TO16( &pt, &lpPos->ptIconPos );
+ {
+ lpPos->ptIconPos.x = pt.x;
+ lpPos->ptIconPos.y = pt.y;
+ }
else if( wnd->dwStyle & WS_MAXIMIZE )
- CONV_POINT32TO16( &pt, &lpPos->ptMaxPos );
+ {
+ lpPos->ptMaxPos.x = pt.x;
+ lpPos->ptMaxPos.y = pt.y;
+ }
else if( restoreRect )
- CONV_RECT32TO16( restoreRect, &lpPos->rectNormal );
-
+ {
+ lpPos->rectNormal.left = restoreRect->left;
+ lpPos->rectNormal.top = restoreRect->top;
+ lpPos->rectNormal.right = restoreRect->right;
+ lpPos->rectNormal.bottom = restoreRect->bottom;
+ }
return lpPos;
}
@@ -772,7 +786,10 @@
lpPos = (LPINTERNALPOS)GetPropA( hwnd, atomInternalPos );
if( lpPos && !EMPTYPOINT(lpPos->ptMaxPos) )
- CONV_POINT16TO32( &lpPos->ptMaxPos, &MinMax.ptMaxPosition );
+ {
+ MinMax.ptMaxPosition.x = lpPos->ptMaxPos.x;
+ MinMax.ptMaxPosition.y = lpPos->ptMaxPos.y;
+ }
else
{
MinMax.ptMaxPosition.x = -xinc;
@@ -883,9 +900,14 @@
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 );
+ wndpl->ptMinPosition.x = lpPos->ptIconPos.x;
+ wndpl->ptMinPosition.y = lpPos->ptIconPos.y;
+ wndpl->ptMaxPosition.x = lpPos->ptMaxPos.x;
+ wndpl->ptMaxPosition.y = lpPos->ptMaxPos.y;
+ wndpl->rcNormalPosition.left = lpPos->rectNormal.left;
+ wndpl->rcNormalPosition.top = lpPos->rectNormal.top;
+ wndpl->rcNormalPosition.right = lpPos->rectNormal.right;
+ wndpl->rcNormalPosition.bottom = lpPos->rectNormal.bottom;
WIN_ReleaseWndPtr(pWnd);
return TRUE;
}
@@ -902,10 +924,23 @@
LPINTERNALPOS lpPos = (LPINTERNALPOS)WINPOS_InitInternalPos( pWnd,
*(LPPOINT)&pWnd->rectWindow.left, &pWnd->rectWindow );
- 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( flags & PLACE_MIN )
+ {
+ lpPos->ptIconPos.x = wndpl->ptMinPosition.x;
+ lpPos->ptIconPos.y = wndpl->ptMinPosition.y;
+ }
+ if( flags & PLACE_MAX )
+ {
+ lpPos->ptMaxPos.x = wndpl->ptMaxPosition.x;
+ lpPos->ptMaxPos.y = wndpl->ptMaxPosition.y;
+ }
+ if( flags & PLACE_RECT)
+ {
+ lpPos->rectNormal.left = wndpl->rcNormalPosition.left;
+ lpPos->rectNormal.top = wndpl->rcNormalPosition.top;
+ lpPos->rectNormal.right = wndpl->rcNormalPosition.right;
+ lpPos->rectNormal.bottom = wndpl->rcNormalPosition.bottom;
+ }
if( pWnd->dwStyle & WS_MINIMIZE )
{
WINPOS_ShowIconTitle( pWnd->hwndSelf, FALSE );
diff --git a/windows/winproc.c b/windows/winproc.c
index f8eaa65..9fbb4cc 100644
--- a/windows/winproc.c
+++ b/windows/winproc.c
@@ -1392,16 +1392,19 @@
DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT*)HeapAlloc(GetProcessHeap(), 0,
sizeof(*dis));
if (!dis) return -1;
- dis->CtlType = dis16->CtlType;
- dis->CtlID = dis16->CtlID;
- dis->itemID = dis16->itemID;
- dis->itemAction = dis16->itemAction;
- dis->itemState = dis16->itemState;
- dis->hwndItem = (dis->CtlType == ODT_MENU) ? (HWND)HMENU_32(dis16->hwndItem)
- : WIN_Handle32( dis16->hwndItem );
- dis->hDC = HDC_32(dis16->hDC);
- dis->itemData = dis16->itemData;
- CONV_RECT16TO32( &dis16->rcItem, &dis->rcItem );
+ dis->CtlType = dis16->CtlType;
+ dis->CtlID = dis16->CtlID;
+ dis->itemID = dis16->itemID;
+ dis->itemAction = dis16->itemAction;
+ dis->itemState = dis16->itemState;
+ dis->hwndItem = (dis->CtlType == ODT_MENU) ? (HWND)HMENU_32(dis16->hwndItem)
+ : WIN_Handle32( dis16->hwndItem );
+ dis->hDC = HDC_32(dis16->hDC);
+ dis->itemData = dis16->itemData;
+ dis->rcItem.left = dis16->rcItem.left;
+ dis->rcItem.top = dis16->rcItem.top;
+ dis->rcItem.right = dis16->rcItem.right;
+ dis->rcItem.bottom = dis16->rcItem.bottom;
*plparam = (LPARAM)dis;
}
return 1;
@@ -1477,13 +1480,22 @@
sizeof(*nc) + sizeof(LPARAM) );
if (!nc) return -1;
nc16 = MapSL(*plparam);
- CONV_RECT16TO32( &nc16->rgrc[0], &nc->rgrc[0] );
+ nc->rgrc[0].left = nc16->rgrc[0].left;
+ nc->rgrc[0].top = nc16->rgrc[0].top;
+ nc->rgrc[0].right = nc16->rgrc[0].right;
+ nc->rgrc[0].bottom = nc16->rgrc[0].bottom;
if (wParam16)
{
nc->lppos = (WINDOWPOS *)HeapAlloc( GetProcessHeap(), 0,
sizeof(*nc->lppos) );
- CONV_RECT16TO32( &nc16->rgrc[1], &nc->rgrc[1] );
- CONV_RECT16TO32( &nc16->rgrc[2], &nc->rgrc[2] );
+ nc->rgrc[1].left = nc16->rgrc[1].left;
+ nc->rgrc[1].top = nc16->rgrc[1].top;
+ nc->rgrc[1].right = nc16->rgrc[1].right;
+ nc->rgrc[1].bottom = nc16->rgrc[1].bottom;
+ nc->rgrc[2].left = nc16->rgrc[2].left;
+ nc->rgrc[2].top = nc16->rgrc[2].top;
+ nc->rgrc[2].right = nc16->rgrc[2].right;
+ nc->rgrc[2].bottom = nc16->rgrc[2].bottom;
if (nc->lppos) WINDOWPOS16to32( MapSL(nc16->lppos), nc->lppos );
}
*(LPARAM *)(nc + 1) = *plparam; /* Store the previous lParam */
@@ -1703,11 +1715,20 @@
NCCALCSIZE_PARAMS *nc = (NCCALCSIZE_PARAMS *)lParam;
lParam = *(LPARAM *)(nc + 1);
nc16 = MapSL(lParam);
- CONV_RECT32TO16( &nc->rgrc[0], &nc16->rgrc[0] );
+ nc16->rgrc[0].left = nc->rgrc[0].left;
+ nc16->rgrc[0].top = nc->rgrc[0].top;
+ nc16->rgrc[0].right = nc->rgrc[0].right;
+ nc16->rgrc[0].bottom = nc->rgrc[0].bottom;
if (wParam)
{
- CONV_RECT32TO16( &nc->rgrc[1], &nc16->rgrc[1] );
- CONV_RECT32TO16( &nc->rgrc[2], &nc16->rgrc[2] );
+ nc16->rgrc[1].left = nc->rgrc[1].left;
+ nc16->rgrc[1].top = nc->rgrc[1].top;
+ nc16->rgrc[1].right = nc->rgrc[1].right;
+ nc16->rgrc[1].bottom = nc->rgrc[1].bottom;
+ nc16->rgrc[2].left = nc->rgrc[2].left;
+ nc16->rgrc[2].top = nc->rgrc[2].top;
+ nc16->rgrc[2].right = nc->rgrc[2].right;
+ nc16->rgrc[2].bottom = nc->rgrc[2].bottom;
if (nc->lppos)
{
WINDOWPOS32to16( nc->lppos, MapSL(nc16->lppos));
@@ -2220,15 +2241,18 @@
DRAWITEMSTRUCT *dis32 = (DRAWITEMSTRUCT *)*plparam;
DRAWITEMSTRUCT16 *dis = HeapAlloc( GetProcessHeap(), 0, sizeof(DRAWITEMSTRUCT16) );
if (!dis) return -1;
- dis->CtlType = (UINT16)dis32->CtlType;
- dis->CtlID = (UINT16)dis32->CtlID;
- dis->itemID = (UINT16)dis32->itemID;
- dis->itemAction = (UINT16)dis32->itemAction;
- dis->itemState = (UINT16)dis32->itemState;
- dis->hwndItem = HWND_16( dis32->hwndItem );
- dis->hDC = HDC_16(dis32->hDC);
- dis->itemData = dis32->itemData;
- CONV_RECT32TO16( &dis32->rcItem, &dis->rcItem );
+ dis->CtlType = (UINT16)dis32->CtlType;
+ dis->CtlID = (UINT16)dis32->CtlID;
+ dis->itemID = (UINT16)dis32->itemID;
+ dis->itemAction = (UINT16)dis32->itemAction;
+ dis->itemState = (UINT16)dis32->itemState;
+ dis->hwndItem = HWND_16( dis32->hwndItem );
+ dis->hDC = HDC_16(dis32->hDC);
+ dis->itemData = dis32->itemData;
+ dis->rcItem.left = dis32->rcItem.left;
+ dis->rcItem.top = dis32->rcItem.top;
+ dis->rcItem.right = dis32->rcItem.right;
+ dis->rcItem.bottom = dis32->rcItem.bottom;
*plparam = MapLS( dis );
}
return 1;
@@ -2318,12 +2342,21 @@
NCCALCSIZE_PARAMS16 *nc = HeapAlloc( GetProcessHeap(), 0, sizeof(*nc) + sizeof(LPARAM));
if (!nc) return -1;
- CONV_RECT32TO16( &nc32->rgrc[0], &nc->rgrc[0] );
+ nc->rgrc[0].left = nc32->rgrc[0].left;
+ nc->rgrc[0].top = nc32->rgrc[0].top;
+ nc->rgrc[0].right = nc32->rgrc[0].right;
+ nc->rgrc[0].bottom = nc32->rgrc[0].bottom;
if (wParam32)
{
WINDOWPOS16 *wp;
- CONV_RECT32TO16( &nc32->rgrc[1], &nc->rgrc[1] );
- CONV_RECT32TO16( &nc32->rgrc[2], &nc->rgrc[2] );
+ nc->rgrc[1].left = nc32->rgrc[1].left;
+ nc->rgrc[1].top = nc32->rgrc[1].top;
+ nc->rgrc[1].right = nc32->rgrc[1].right;
+ nc->rgrc[1].bottom = nc32->rgrc[1].bottom;
+ nc->rgrc[2].left = nc32->rgrc[2].left;
+ nc->rgrc[2].top = nc32->rgrc[2].top;
+ nc->rgrc[2].right = nc32->rgrc[2].right;
+ nc->rgrc[2].bottom = nc32->rgrc[2].bottom;
if (!(wp = HeapAlloc( GetProcessHeap(), 0, sizeof(WINDOWPOS16) )))
{
HeapFree( GetProcessHeap(), 0, nc );
@@ -2541,10 +2574,15 @@
case CB_GETDROPPEDCONTROLRECT:
case LB_GETITEMRECT:
{
+ RECT *r32;
RECT16 *rect = MapSL(p16->lParam);
UnMapLS( p16->lParam );
p16->lParam = *(LPARAM *)(rect + 1);
- CONV_RECT16TO32( rect, (RECT *)(p16->lParam));
+ r32 = (RECT *)p16->lParam;
+ r32->left = rect->left;
+ r32->top = rect->top;
+ r32->right = rect->right;
+ r32->bottom = rect->bottom;
HeapFree( GetProcessHeap(), 0, rect );
}
break;
@@ -2615,13 +2653,22 @@
UnMapLS( p16->lParam );
p16->lParam = *(LPARAM *)(nc + 1);
nc32 = (NCCALCSIZE_PARAMS *)(p16->lParam);
- CONV_RECT16TO32( &nc->rgrc[0], &nc32->rgrc[0] );
+ nc32->rgrc[0].left = nc->rgrc[0].left;
+ nc32->rgrc[0].top = nc->rgrc[0].top;
+ nc32->rgrc[0].right = nc->rgrc[0].right;
+ nc32->rgrc[0].bottom = nc->rgrc[0].bottom;
if (p16->wParam)
{
WINDOWPOS16 *pos = MapSL(nc->lppos);
UnMapLS( nc->lppos );
- CONV_RECT16TO32( &nc->rgrc[1], &nc32->rgrc[1] );
- CONV_RECT16TO32( &nc->rgrc[2], &nc32->rgrc[2] );
+ nc32->rgrc[1].left = nc->rgrc[1].left;
+ nc32->rgrc[1].top = nc->rgrc[1].top;
+ nc32->rgrc[1].right = nc->rgrc[1].right;
+ nc32->rgrc[1].bottom = nc->rgrc[1].bottom;
+ nc32->rgrc[2].left = nc->rgrc[2].left;
+ nc32->rgrc[2].top = nc->rgrc[2].top;
+ nc32->rgrc[2].right = nc->rgrc[2].right;
+ nc32->rgrc[2].bottom = nc->rgrc[2].bottom;
WINDOWPOS16to32( pos, nc32->lppos );
HeapFree( GetProcessHeap(), 0, pos );
}