Commit 28a632a8 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

Some -DSTRICT fixes.

parent 2b529f17
......@@ -231,7 +231,7 @@ static HPEN EMFDRV_CreatePenIndirect(PHYSDEV dev, HPEN hPen )
if(!EMFDRV_WriteRecord( dev, &emr.emr ))
index = 0;
return index;
return (HPEN)index;
}
/******************************************************************
......@@ -257,7 +257,7 @@ HPEN EMFDRV_SelectPen(PHYSDEV dev, HPEN hPen )
goto found;
}
}
if (!(index = EMFDRV_CreatePenIndirect(dev, hPen ))) return 0;
if (!(index = (DWORD)EMFDRV_CreatePenIndirect(dev, hPen ))) return 0;
found:
emr.emr.iType = EMR_SELECTOBJECT;
emr.emr.nSize = sizeof(emr);
......
......@@ -21,6 +21,7 @@
#include "windef.h"
#include "wine/winbase16.h"
#include "gdi.h"
#include "wownt32.h"
#include "mfdrv/metafiledrv.h"
#include "wine/debug.h"
......@@ -324,7 +325,7 @@ HMETAFILE16 WINAPI CloseMetaFile16(
{
HMETAFILE16 hmf;
METAFILEDRV_PDEVICE *physDev;
DC *dc = MFDRV_CloseMetaFile(hdc);
DC *dc = MFDRV_CloseMetaFile(HDC_32(hdc));
if (!dc) return 0;
physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
......
......@@ -24,6 +24,7 @@
#include "bitmap.h"
#include "font.h"
#include "wownt32.h"
#include "mfdrv/metafiledrv.h"
#include "wine/debug.h"
......@@ -78,7 +79,7 @@ INT16 MFDRV_CreateBrushIndirect(PHYSDEV dev, HBRUSH hBrush )
BITMAPINFO *info;
DWORD bmSize;
GetObjectA(logbrush.lbHatch, sizeof(bm), &bm);
GetObjectA((HANDLE)logbrush.lbHatch, sizeof(bm), &bm);
if(bm.bmBitsPixel != 1 || bm.bmPlanes != 1) {
FIXME("Trying to store a colour pattern brush\n");
goto done;
......@@ -104,7 +105,7 @@ INT16 MFDRV_CreateBrushIndirect(PHYSDEV dev, HBRUSH hBrush )
info->bmiHeader.biBitCount = 1;
bits = ((BYTE *)info) + sizeof(BITMAPINFO) + sizeof(RGBQUAD);
GetDIBits(physDev->hdc, logbrush.lbHatch, 0, bm.bmHeight,
GetDIBits(physDev->hdc, (HANDLE)logbrush.lbHatch, 0, bm.bmHeight,
bits, info, DIB_RGB_COLORS);
*(DWORD *)info->bmiColors = 0;
*(DWORD *)(info->bmiColors + 1) = 0xffffff;
......@@ -168,7 +169,7 @@ HBRUSH MFDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush )
* MFDRV_CreateFontIndirect
*/
static BOOL MFDRV_CreateFontIndirect(PHYSDEV dev, HFONT16 hFont, LOGFONT16 *logfont)
static BOOL MFDRV_CreateFontIndirect(PHYSDEV dev, HFONT hFont, LOGFONT16 *logfont)
{
int index;
char buffer[sizeof(METARECORD) - 2 + sizeof(LOGFONT16)];
......@@ -195,7 +196,7 @@ HFONT MFDRV_SelectFont( PHYSDEV dev, HFONT hfont )
{
LOGFONT16 lf16;
if (!GetObject16( hfont, sizeof(lf16), &lf16 )) return GDI_ERROR;
if (!GetObject16( HFONT_16(hfont), sizeof(lf16), &lf16 )) return HGDI_ERROR;
if (MFDRV_CreateFontIndirect(dev, hfont, &lf16)) return 0;
return HGDI_ERROR;
}
......@@ -203,7 +204,7 @@ HFONT MFDRV_SelectFont( PHYSDEV dev, HFONT hfont )
/******************************************************************
* MFDRV_CreatePenIndirect
*/
static BOOL MFDRV_CreatePenIndirect(PHYSDEV dev, HPEN16 hPen, LOGPEN16 *logpen)
static BOOL MFDRV_CreatePenIndirect(PHYSDEV dev, HPEN hPen, LOGPEN16 *logpen)
{
int index;
char buffer[sizeof(METARECORD) - 2 + sizeof(*logpen)];
......@@ -230,7 +231,7 @@ HPEN MFDRV_SelectPen( PHYSDEV dev, HPEN hpen )
{
LOGPEN16 logpen;
if (!GetObject16( hpen, sizeof(logpen), &logpen )) return 0;
if (!GetObject16( HPEN_16(hpen), sizeof(logpen), &logpen )) return 0;
if (MFDRV_CreatePenIndirect( dev, hpen, &logpen )) return hpen;
return 0;
}
......@@ -21,6 +21,7 @@
#include <string.h>
#include "winnls.h"
#include "wownt32.h"
#include "wine/winbase16.h"
#include "win16drv/win16drv.h"
#include "gdi.h"
......@@ -147,7 +148,7 @@ HFONT WIN16DRV_SelectFont( PHYSDEV dev, HFONT hfont)
DC *dc = physDev->dc;
int nSize;
if (!GetObject16( hfont, sizeof(physDev->lf), &physDev->lf ))
if (!GetObject16( HFONT_16(hfont), sizeof(physDev->lf), &physDev->lf ))
return HGDI_ERROR;
TRACE("WIN16DRV_FONT_SelectObject %s h=%d\n",
......@@ -213,7 +214,7 @@ HFONT WIN16DRV_SelectFont( PHYSDEV dev, HFONT hfont)
physDev->tm.tmMaxCharWidth,
physDev->tm.tmWeight);
return TRUE; /* We'll use a device font */
return (HFONT)1; /* We'll use a device font */
}
/***********************************************************************
......
......@@ -21,6 +21,7 @@
#include <stdio.h>
#include "win16drv/win16drv.h"
#include "wownt32.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(win16drv);
......@@ -40,7 +41,7 @@ WIN16DRV_LineTo( PHYSDEV dev, INT x, INT y )
points[0].y = dc->CursPosY;
points[1].x = x;
points[1].y = y;
LPtoDP16( physDev->hdc, points, 2 );
LPtoDP16( HDC_16(physDev->hdc), points, 2 );
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
OS_POLYLINE, 2, points,
......@@ -72,7 +73,7 @@ WIN16DRV_Rectangle(PHYSDEV dev, INT left, INT top, INT right, INT bottom)
points[0].y = top;
points[1].x = right;
points[1].y = bottom;
LPtoDP16( physDev->hdc, points, 2 );
LPtoDP16( HDC_16(physDev->hdc), points, 2 );
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
OS_RECTANGLE, 2, points,
......@@ -109,7 +110,7 @@ WIN16DRV_Polygon(PHYSDEV dev, const POINT* pt, INT count )
points[i].x = pt[i].x;
points[i].y = pt[i].y;
}
LPtoDP16( physDev->hdc, points, count-1 );
LPtoDP16( HDC_16(physDev->hdc), points, count-1 );
points[count-1].x = points[0].x;
points[count-1].y = points[0].y;
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
......@@ -144,7 +145,7 @@ WIN16DRV_Polyline(PHYSDEV dev, const POINT* pt, INT count )
points[i].x = pt[i].x;
points[i].y = pt[i].y;
}
LPtoDP16( physDev->hdc, points, count );
LPtoDP16( HDC_16(physDev->hdc), points, count );
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
OS_POLYLINE, count, points,
physDev->PenInfo,
......@@ -174,7 +175,7 @@ WIN16DRV_Ellipse(PHYSDEV dev, INT left, INT top, INT right, INT bottom)
points[0].y = top;
points[1].x = right;
points[1].y = bottom;
LPtoDP16( physDev->hdc, points, 2 );
LPtoDP16( HDC_16(physDev->hdc), points, 2 );
bRet = PRTDRV_Output(physDev->segptrPDEVICE,
OS_ELLIPSE, 2, points,
......
......@@ -24,6 +24,7 @@
#include <stdio.h>
#include "win16drv/win16drv.h"
#include "wownt32.h"
#include "wine/debug.h"
......@@ -49,7 +50,7 @@ HBRUSH WIN16DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush )
int nSize;
LOGBRUSH16 lBrush16;
if (!GetObject16( hbrush, sizeof(lBrush16), &lBrush16 )) return 0;
if (!GetObject16( HBRUSH_16(hbrush), sizeof(lBrush16), &lBrush16 )) return 0;
if ( physDev->BrushInfo )
{
......@@ -79,7 +80,7 @@ HPEN WIN16DRV_SelectPen( PHYSDEV dev, HPEN hpen )
int nSize;
LOGPEN16 lPen16;
if (!GetObject16( hpen, sizeof(lPen16), &lPen16 )) return 0;
if (!GetObject16( HPEN_16(hpen), sizeof(lPen16), &lPen16 )) return 0;
if ( physDev->PenInfo )
{
......
......@@ -25,6 +25,7 @@
#include "wine/debug.h"
#include "palette.h"
#include "windef.h"
#include "wownt32.h"
WINE_DEFAULT_DEBUG_CHANNEL(wing);
......@@ -99,7 +100,8 @@ HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 hdc, BITMAPINFO *bmpi,
*/
SEGPTR WINAPI WinGGetDIBPointer16(HBITMAP16 hWinGBitmap, BITMAPINFO* bmpi)
{
BITMAPOBJ* bmp = (BITMAPOBJ *) GDI_GetObjPtr( hWinGBitmap, BITMAP_MAGIC );
BITMAPOBJ* bmp = (BITMAPOBJ *) GDI_GetObjPtr( HBITMAP_32(hWinGBitmap),
BITMAP_MAGIC );
SEGPTR res = 0;
TRACE("(%d,%p)\n", hWinGBitmap, bmpi);
......@@ -108,7 +110,7 @@ SEGPTR WINAPI WinGGetDIBPointer16(HBITMAP16 hWinGBitmap, BITMAPINFO* bmpi)
if (bmpi) FIXME(": Todo - implement setting BITMAPINFO\n");
res = bmp->segptr_bits;
GDI_ReleaseObj( hWinGBitmap );
GDI_ReleaseObj( HBITMAP_32(hWinGBitmap) );
return res;
}
......@@ -137,10 +139,10 @@ UINT16 WINAPI WinGGetDIBColorTable16(HDC16 hdc, UINT16 start, UINT16 num,
*/
HPALETTE16 WINAPI WinGCreateHalfTonePalette16(void)
{
HDC hdc = CreateCompatibleDC(0);
HDC16 hdc = CreateCompatibleDC16(0);
HPALETTE16 ret = CreateHalftonePalette16(hdc);
TRACE("(void)\n");
DeleteDC(hdc);
DeleteDC16(hdc);
return ret;
}
......
......@@ -19,6 +19,7 @@
*/
#include "gdi.h"
#include "wownt32.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdi);
......@@ -53,7 +54,7 @@ void MAPPING_FixIsotropic( DC * dc )
*/
BOOL16 WINAPI DPtoLP16( HDC16 hdc, LPPOINT16 points, INT16 count )
{
DC * dc = DC_GetDCPtr( hdc );
DC * dc = DC_GetDCPtr( HDC_32(hdc) );
if (!dc) return FALSE;
while (count--)
......@@ -62,7 +63,7 @@ BOOL16 WINAPI DPtoLP16( HDC16 hdc, LPPOINT16 points, INT16 count )
points->y = MulDiv( points->y - dc->vportOrgY, dc->wndExtY, dc->vportExtY ) + dc->wndOrgY;
points++;
}
GDI_ReleaseObj( hdc );
GDI_ReleaseObj( HDC_32(hdc) );
return TRUE;
}
......@@ -100,7 +101,7 @@ BOOL WINAPI DPtoLP( HDC hdc, LPPOINT points, INT count )
*/
BOOL16 WINAPI LPtoDP16( HDC16 hdc, LPPOINT16 points, INT16 count )
{
DC * dc = DC_GetDCPtr( hdc );
DC * dc = DC_GetDCPtr( HDC_32(hdc) );
if (!dc) return FALSE;
while (count--)
......@@ -109,7 +110,7 @@ BOOL16 WINAPI LPtoDP16( HDC16 hdc, LPPOINT16 points, INT16 count )
points->y = MulDiv( points->y - dc->wndOrgY, dc->vportExtY, dc->wndExtY ) + dc->vportOrgY;
points++;
}
GDI_ReleaseObj( hdc );
GDI_ReleaseObj( HDC_32(hdc) );
return TRUE;
}
......
......@@ -122,7 +122,8 @@ HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
if (width < 0) width = -width;
/* Create the BITMAPOBJ */
if (!(bmp = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC, &hbitmap, &bitmap_funcs )))
if (!(bmp = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC,
(HGDIOBJ *)&hbitmap, &bitmap_funcs )))
return 0;
TRACE("%dx%d, %d colors returning %08x\n", width, height,
......
......@@ -26,6 +26,7 @@
#include "wingdi.h"
#include "wine/wingdi16.h"
#include "bitmap.h"
#include "wownt32.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdi);
......@@ -93,7 +94,8 @@ HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH * brush )
BRUSHOBJ * ptr;
HBRUSH hbrush;
if (!(ptr = GDI_AllocObject( sizeof(BRUSHOBJ), BRUSH_MAGIC, &hbrush, &brush_funcs ))) return 0;
if (!(ptr = GDI_AllocObject( sizeof(BRUSHOBJ), BRUSH_MAGIC,
(HGDIOBJ *)&hbrush, &brush_funcs ))) return 0;
ptr->logbrush.lbStyle = brush->lbStyle;
ptr->logbrush.lbColor = brush->lbColor;
ptr->logbrush.lbHatch = brush->lbHatch;
......@@ -372,7 +374,7 @@ BOOL16 WINAPI SetSolidBrush16(HBRUSH16 hBrush, COLORREF newColor )
BOOL16 res = FALSE;
TRACE("(hBrush %04x, newColor %08lx)\n", hBrush, (DWORD)newColor);
if (!(brushPtr = (BRUSHOBJ *) GDI_GetObjPtr( hBrush, BRUSH_MAGIC )))
if (!(brushPtr = (BRUSHOBJ *) GDI_GetObjPtr( HBRUSH_32(hBrush), BRUSH_MAGIC )))
return FALSE;
if (brushPtr->logbrush.lbStyle == BS_SOLID)
......@@ -381,6 +383,6 @@ BOOL16 WINAPI SetSolidBrush16(HBRUSH16 hBrush, COLORREF newColor )
res = TRUE;
}
GDI_ReleaseObj( hBrush );
GDI_ReleaseObj( HBRUSH_32(hBrush) );
return res;
}
......@@ -22,6 +22,7 @@
#include "winbase.h"
#include "winerror.h"
#include "wownt32.h"
#include "gdi.h"
......@@ -403,11 +404,11 @@ BOOL WINAPI GetWindowOrgEx( HDC hdc, LPPOINT pt )
HRGN16 WINAPI InquireVisRgn16( HDC16 hdc )
{
HRGN16 ret = 0;
DC * dc = DC_GetDCPtr( hdc );
DC * dc = DC_GetDCPtr( HDC_32(hdc) );
if (dc)
{
ret = dc->hVisRgn;
GDI_ReleaseObj( hdc );
ret = HRGN_16(dc->hVisRgn);
GDI_ReleaseObj( HDC_32(hdc) );
}
return ret;
}
......@@ -419,11 +420,11 @@ HRGN16 WINAPI InquireVisRgn16( HDC16 hdc )
HRGN16 WINAPI GetClipRgn16( HDC16 hdc )
{
HRGN16 ret = 0;
DC * dc = DC_GetDCPtr( hdc );
DC * dc = DC_GetDCPtr( HDC_32(hdc) );
if (dc)
{
ret = dc->hClipRgn;
GDI_ReleaseObj( hdc );
ret = HRGN_16(dc->hClipRgn);
GDI_ReleaseObj( HDC_32(hdc) );
}
return ret;
}
......@@ -25,6 +25,7 @@
#include "bitmap.h"
#include "selectors.h"
#include "gdi.h"
#include "wownt32.h"
#include "wine/debug.h"
#include "palette.h"
......@@ -835,7 +836,7 @@ HBITMAP16 WINAPI CreateDIBSection16 (HDC16 hdc, BITMAPINFO *bmi, UINT16 usage,
LPVOID bits32;
HBITMAP hbitmap;
hbitmap = CreateDIBSection( hdc, bmi, usage, &bits32, section, offset );
hbitmap = CreateDIBSection( HDC_32(hdc), bmi, usage, &bits32, section, offset );
if (hbitmap)
{
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr(hbitmap, BITMAP_MAGIC);
......@@ -863,7 +864,7 @@ HBITMAP16 WINAPI CreateDIBSection16 (HDC16 hdc, BITMAPINFO *bmi, UINT16 usage,
}
if (bmp) GDI_ReleaseObj( hbitmap );
}
return hbitmap;
return HBITMAP_16(hbitmap);
}
/***********************************************************************
......
......@@ -60,7 +60,8 @@ HENHMETAFILE EMF_Create_HENHMETAFILE(ENHMETAHEADER *emh, BOOL on_disk )
{
HENHMETAFILE hmf = 0;
ENHMETAFILEOBJ *metaObj = GDI_AllocObject( sizeof(ENHMETAFILEOBJ),
ENHMETAFILE_MAGIC, &hmf, NULL );
ENHMETAFILE_MAGIC,
(HGDIOBJ *)&hmf, NULL );
if (metaObj)
{
metaObj->emh = emh;
......
......@@ -27,6 +27,7 @@
#include <assert.h>
#include "winerror.h"
#include "winnls.h"
#include "wownt32.h"
#include "wine/unicode.h"
#include "font.h"
#include "wine/debug.h"
......@@ -313,7 +314,8 @@ HFONT WINAPI CreateFontIndirectW( const LOGFONTW *plf )
if (plf)
{
FONTOBJ* fontPtr;
if ((fontPtr = GDI_AllocObject( sizeof(FONTOBJ), FONT_MAGIC, &hFont, &font_funcs )))
if ((fontPtr = GDI_AllocObject( sizeof(FONTOBJ), FONT_MAGIC,
(HGDIOBJ *)&hFont, &font_funcs )))
{
memcpy( &fontPtr->logfont, plf, sizeof(LOGFONTW) );
......@@ -589,10 +591,10 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
{
fontEnum16 fe16;
INT16 retVal = 0;
DC* dc = DC_GetDCPtr( hDC );
DC* dc = DC_GetDCPtr( HDC_32(hDC) );
if (!dc) return 0;
fe16.hdc = hDC;
fe16.hdc = HDC_32(hDC);
fe16.dc = dc;
fe16.physDev = dc->physDev;
......
......@@ -52,6 +52,7 @@
#include "wine/wingdi16.h"
#include "bitmap.h"
#include "global.h"
#include "wownt32.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(metafile);
......@@ -109,7 +110,8 @@ static int MF_AddHandle(HANDLETABLE *ht, UINT htlen, HGDIOBJ hobj)
HMETAFILE MF_Create_HMETAFILE(METAHEADER *mh)
{
HMETAFILE hmf = 0;
METAFILEOBJ *metaObj = GDI_AllocObject( sizeof(METAFILEOBJ), METAFILE_MAGIC, &hmf, NULL );
METAFILEOBJ *metaObj = GDI_AllocObject( sizeof(METAFILEOBJ), METAFILE_MAGIC,
(HGDIOBJ *)&hmf, NULL );
if (metaObj)
{
metaObj->mh = mh;
......@@ -593,7 +595,7 @@ BOOL16 WINAPI PlayMetaFile16( HDC16 hdc, HMETAFILE16 hmf )
{
BOOL16 ret;
METAHEADER *mh = MF_GetMetaHeader16( hmf );
ret = MF_PlayMetaFile( hdc, mh );
ret = MF_PlayMetaFile( HDC_32(hdc), mh );
MF_ReleaseMetaHeader16( hmf );
return ret;
}
......@@ -618,12 +620,13 @@ BOOL WINAPI PlayMetaFile(
* EnumMetaFile (GDI.175)
*
*/
BOOL16 WINAPI EnumMetaFile16( HDC16 hdc, HMETAFILE16 hmf,
BOOL16 WINAPI EnumMetaFile16( HDC16 hdc16, HMETAFILE16 hmf,
MFENUMPROC16 lpEnumFunc, LPARAM lpData )
{
METAHEADER *mh = MF_GetMetaHeader16(hmf);
METARECORD *mr;
HANDLETABLE16 *ht;
HDC hdc = HDC_32(hdc16);
HGLOBAL16 hHT;
SEGPTR spht;
unsigned int offset = 0;
......@@ -664,7 +667,7 @@ BOOL16 WINAPI EnumMetaFile16( HDC16 hdc, HMETAFILE16 hmf,
{
mr = (METARECORD *)((char *)mh + offset);
if (!MF_CallTo16_word_wllwl( lpEnumFunc, hdc, spht,
if (!MF_CallTo16_word_wllwl( lpEnumFunc, hdc16, spht,
MAKESEGPTR( seg + (HIWORD(offset) << __AHSHIFT), LOWORD(offset) ),
mh->mtNoObjects, (LONG)lpData ))
{
......
......@@ -29,6 +29,7 @@
#include "winbase.h"
#include "windef.h"
#include "wingdi.h"
#include "wownt32.h"
#include "wine/winuser16.h"
#include "gdi.h"
#include "palette.h"
......@@ -159,7 +160,8 @@ HPALETTE WINAPI CreatePalette(
size = sizeof(LOGPALETTE) + (palette->palNumEntries - 1) * sizeof(PALETTEENTRY);
if (!(palettePtr = GDI_AllocObject( size + sizeof(int*) +sizeof(GDIOBJHDR),
PALETTE_MAGIC, &hpalette, &palette_funcs ))) return 0;
PALETTE_MAGIC, (HGDIOBJ *)&hpalette,
&palette_funcs ))) return 0;
memcpy( &palettePtr->logpalette, palette, size );
PALETTE_ValidateFlags(palettePtr->logpalette.palPalEntry,
palettePtr->logpalette.palNumEntries);
......@@ -723,10 +725,10 @@ UINT16 WINAPI RealizeDefaultPalette16( HDC16 hdc )
TRACE("%04x\n", hdc );
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
if (!(dc = DC_GetDCPtr( HDC_32(hdc) ))) return 0;
if (dc->funcs->pRealizeDefaultPalette) ret = dc->funcs->pRealizeDefaultPalette( dc->physDev );
GDI_ReleaseObj( hdc );
GDI_ReleaseObj( HDC_32(hdc) );
return ret;
}
......@@ -735,11 +737,11 @@ UINT16 WINAPI RealizeDefaultPalette16( HDC16 hdc )
*/
BOOL16 WINAPI IsDCCurrentPalette16(HDC16 hDC)
{
DC *dc = DC_GetDCPtr( hDC );
DC *dc = DC_GetDCPtr( HDC_32(hDC) );
if (dc)
{
BOOL bRet = dc->hPalette == hPrimaryPalette;
GDI_ReleaseObj( hDC );
GDI_ReleaseObj( HDC_32(hDC) );
return bRet;
}
return FALSE;
......
......@@ -79,7 +79,8 @@ HPEN WINAPI CreatePenIndirect( const LOGPEN * pen )
PENOBJ * penPtr;
HPEN hpen;
if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, &hpen, &pen_funcs ))) return 0;
if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, (HGDIOBJ *)&hpen,
&pen_funcs ))) return 0;
penPtr->logpen.lopnStyle = pen->lopnStyle;
penPtr->logpen.lopnWidth = pen->lopnWidth;
penPtr->logpen.lopnColor = pen->lopnColor;
......@@ -106,7 +107,8 @@ HPEN WINAPI ExtCreatePen( DWORD style, DWORD width,
if (brush->lbHatch)
FIXME("Hatches not implemented\n");
if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, &hpen, &pen_funcs ))) return 0;
if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, (HGDIOBJ *)&hpen,
&pen_funcs ))) return 0;
penPtr->logpen.lopnStyle = style & ~PS_TYPE_MASK;
/* PS_USERSTYLE workaround */
......
......@@ -513,7 +513,8 @@ static HRGN REGION_CreateRegion( INT n )
HRGN hrgn;
RGNOBJ *obj;
if(!(obj = GDI_AllocObject( sizeof(RGNOBJ), REGION_MAGIC, &hrgn, &region_funcs ))) return 0;
if(!(obj = GDI_AllocObject( sizeof(RGNOBJ), REGION_MAGIC, (HGDIOBJ *)&hrgn,
&region_funcs ))) return 0;
if(!(obj->rgn = REGION_AllocWineRegion(n))) {
GDI_FreeObject( hrgn, obj );
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment