1993-09-04 10:09:32 +00:00
|
|
|
/*
|
|
|
|
* GDI brush objects
|
|
|
|
*
|
1995-01-09 18:21:16 +00:00
|
|
|
* Copyright 1993, 1994 Alexandre Julliard
|
2002-03-09 23:29:33 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1995-01-09 18:21:16 +00:00
|
|
|
*/
|
1993-09-04 10:09:32 +00:00
|
|
|
|
2001-07-18 21:04:23 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2003-09-05 23:08:26 +00:00
|
|
|
#include <stdarg.h>
|
1999-02-28 12:27:56 +00:00
|
|
|
#include <string.h>
|
2001-07-18 21:04:23 +00:00
|
|
|
|
2003-09-05 23:08:26 +00:00
|
|
|
#include "windef.h"
|
1999-02-17 13:51:06 +00:00
|
|
|
#include "winbase.h"
|
2001-07-18 21:04:23 +00:00
|
|
|
#include "wingdi.h"
|
2004-01-15 00:35:38 +00:00
|
|
|
#include "gdi_private.h"
|
2002-03-09 23:29:33 +00:00
|
|
|
#include "wine/debug.h"
|
1993-09-04 10:09:32 +00:00
|
|
|
|
2002-03-09 23:29:33 +00:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(gdi);
|
1999-04-19 14:56:29 +00:00
|
|
|
|
2002-05-31 18:43:22 +00:00
|
|
|
/* GDI logical brush object */
|
|
|
|
typedef struct
|
|
|
|
{
|
2011-11-02 19:58:36 +00:00
|
|
|
LOGBRUSH logbrush;
|
2011-12-29 15:17:44 +00:00
|
|
|
struct brush_pattern pattern;
|
2002-05-31 18:43:22 +00:00
|
|
|
} BRUSHOBJ;
|
|
|
|
|
|
|
|
#define NB_HATCH_STYLES 6
|
|
|
|
|
2007-09-27 18:14:13 +00:00
|
|
|
static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc );
|
2009-01-27 15:30:43 +00:00
|
|
|
static INT BRUSH_GetObject( HGDIOBJ handle, INT count, LPVOID buffer );
|
2009-01-27 15:19:37 +00:00
|
|
|
static BOOL BRUSH_DeleteObject( HGDIOBJ handle );
|
2002-05-31 18:43:22 +00:00
|
|
|
|
|
|
|
static const struct gdi_obj_funcs brush_funcs =
|
|
|
|
{
|
|
|
|
BRUSH_SelectObject, /* pSelectObject */
|
|
|
|
BRUSH_GetObject, /* pGetObjectA */
|
|
|
|
BRUSH_GetObject, /* pGetObjectW */
|
|
|
|
NULL, /* pUnrealizeObject */
|
|
|
|
BRUSH_DeleteObject /* pDeleteObject */
|
|
|
|
};
|
|
|
|
|
1999-10-23 18:56:30 +00:00
|
|
|
|
2012-05-23 19:12:04 +00:00
|
|
|
static BOOL copy_bitmap( struct brush_pattern *brush, HBITMAP bitmap )
|
2011-11-03 10:11:14 +00:00
|
|
|
{
|
2012-05-23 19:12:04 +00:00
|
|
|
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256])];
|
|
|
|
BITMAPINFO *info = (BITMAPINFO *)buffer;
|
2011-11-03 10:11:14 +00:00
|
|
|
struct gdi_image_bits bits;
|
|
|
|
struct bitblt_coords src;
|
2012-05-23 19:12:04 +00:00
|
|
|
BITMAPOBJ *bmp = GDI_GetObjPtr( bitmap, OBJ_BITMAP );
|
2011-12-29 19:16:46 +00:00
|
|
|
|
2012-05-23 19:12:04 +00:00
|
|
|
if (!bmp) return FALSE;
|
2011-11-03 10:11:14 +00:00
|
|
|
|
|
|
|
src.visrect.left = src.x = 0;
|
|
|
|
src.visrect.top = src.y = 0;
|
2012-01-10 15:09:54 +00:00
|
|
|
src.visrect.right = src.width = bmp->dib.dsBm.bmWidth;
|
|
|
|
src.visrect.bottom = src.height = bmp->dib.dsBm.bmHeight;
|
2012-05-29 12:24:11 +00:00
|
|
|
if (get_image_from_bitmap( bmp, info, &bits, &src )) goto done;
|
2011-11-03 10:11:14 +00:00
|
|
|
|
2012-05-23 19:12:04 +00:00
|
|
|
brush->bits = bits;
|
|
|
|
if (!bits.free)
|
2011-11-03 20:14:42 +00:00
|
|
|
{
|
2012-05-23 19:12:04 +00:00
|
|
|
if (!(brush->bits.ptr = HeapAlloc( GetProcessHeap(), 0, info->bmiHeader.biSizeImage ))) goto done;
|
|
|
|
memcpy( brush->bits.ptr, bits.ptr, info->bmiHeader.biSizeImage );
|
|
|
|
brush->bits.free = free_heap_bits;
|
2011-11-03 20:14:42 +00:00
|
|
|
}
|
|
|
|
|
2012-05-23 19:12:04 +00:00
|
|
|
if (!(brush->info = HeapAlloc( GetProcessHeap(), 0, get_dib_info_size( info, DIB_RGB_COLORS ))))
|
2011-11-03 20:14:42 +00:00
|
|
|
{
|
2012-05-23 19:12:04 +00:00
|
|
|
if (brush->bits.free) brush->bits.free( &brush->bits );
|
2011-11-03 20:14:42 +00:00
|
|
|
goto done;
|
|
|
|
}
|
2012-05-23 19:12:04 +00:00
|
|
|
memcpy( brush->info, info, get_dib_info_size( info, DIB_RGB_COLORS ));
|
|
|
|
brush->bits.is_copy = FALSE; /* the bits can't be modified */
|
2011-11-03 20:14:42 +00:00
|
|
|
brush->usage = DIB_RGB_COLORS;
|
|
|
|
|
|
|
|
done:
|
|
|
|
GDI_ReleaseObj( bitmap );
|
|
|
|
return brush->info != NULL;
|
|
|
|
}
|
|
|
|
|
2011-12-29 15:17:44 +00:00
|
|
|
BOOL store_brush_pattern( LOGBRUSH *brush, struct brush_pattern *pattern )
|
|
|
|
{
|
|
|
|
HGLOBAL hmem = 0;
|
|
|
|
|
|
|
|
pattern->info = NULL;
|
|
|
|
pattern->bits.free = NULL;
|
|
|
|
|
|
|
|
switch (brush->lbStyle)
|
|
|
|
{
|
|
|
|
case BS_SOLID:
|
|
|
|
case BS_HOLLOW:
|
2011-12-30 10:02:57 +00:00
|
|
|
return TRUE;
|
|
|
|
|
2011-12-29 15:17:44 +00:00
|
|
|
case BS_HATCHED:
|
2011-12-30 10:02:57 +00:00
|
|
|
if (brush->lbHatch > HS_DIAGCROSS)
|
|
|
|
{
|
|
|
|
if (brush->lbHatch >= HS_API_MAX) return FALSE;
|
|
|
|
brush->lbStyle = BS_SOLID;
|
|
|
|
brush->lbHatch = 0;
|
|
|
|
}
|
2011-12-29 15:17:44 +00:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
case BS_PATTERN8X8:
|
|
|
|
brush->lbStyle = BS_PATTERN;
|
|
|
|
/* fall through */
|
|
|
|
case BS_PATTERN:
|
|
|
|
brush->lbColor = 0;
|
|
|
|
return copy_bitmap( pattern, (HBITMAP)brush->lbHatch );
|
|
|
|
|
|
|
|
case BS_DIBPATTERN:
|
|
|
|
hmem = (HGLOBAL)brush->lbHatch;
|
|
|
|
if (!(brush->lbHatch = (ULONG_PTR)GlobalLock( hmem ))) return FALSE;
|
|
|
|
/* fall through */
|
|
|
|
case BS_DIBPATTERNPT:
|
|
|
|
pattern->usage = brush->lbColor;
|
|
|
|
pattern->info = copy_packed_dib( (BITMAPINFO *)brush->lbHatch, pattern->usage );
|
|
|
|
if (hmem) GlobalUnlock( hmem );
|
|
|
|
if (!pattern->info) return FALSE;
|
|
|
|
pattern->bits.ptr = (char *)pattern->info + get_dib_info_size( pattern->info, pattern->usage );
|
|
|
|
brush->lbStyle = BS_DIBPATTERN;
|
|
|
|
brush->lbColor = 0;
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
case BS_DIBPATTERN8X8:
|
|
|
|
case BS_MONOPATTERN:
|
|
|
|
case BS_INDEXED:
|
|
|
|
default:
|
|
|
|
WARN( "invalid brush style %u\n", brush->lbStyle );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void free_brush_pattern( struct brush_pattern *pattern )
|
|
|
|
{
|
|
|
|
if (pattern->bits.free) pattern->bits.free( &pattern->bits );
|
|
|
|
HeapFree( GetProcessHeap(), 0, pattern->info );
|
|
|
|
}
|
|
|
|
|
2011-11-01 21:05:16 +00:00
|
|
|
BOOL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void **bits, UINT *usage )
|
|
|
|
{
|
|
|
|
BRUSHOBJ *brush;
|
|
|
|
BOOL ret = FALSE;
|
|
|
|
|
|
|
|
if (!(brush = GDI_GetObjPtr( handle, OBJ_BRUSH ))) return FALSE;
|
|
|
|
|
2011-12-29 15:17:44 +00:00
|
|
|
if (brush->pattern.info)
|
2011-11-01 21:05:16 +00:00
|
|
|
{
|
2011-12-29 15:17:44 +00:00
|
|
|
memcpy( info, brush->pattern.info, get_dib_info_size( brush->pattern.info, brush->pattern.usage ));
|
2011-12-12 11:23:12 +00:00
|
|
|
if (info->bmiHeader.biBitCount <= 8 && !info->bmiHeader.biClrUsed)
|
|
|
|
fill_default_color_table( info );
|
2011-12-29 15:17:44 +00:00
|
|
|
*bits = brush->pattern.bits.ptr;
|
|
|
|
*usage = brush->pattern.usage;
|
2011-11-01 21:05:16 +00:00
|
|
|
ret = TRUE;
|
|
|
|
}
|
|
|
|
GDI_ReleaseObj( handle );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1993-09-04 10:09:32 +00:00
|
|
|
/***********************************************************************
|
2001-02-14 23:11:17 +00:00
|
|
|
* CreateBrushIndirect (GDI32.@)
|
1999-10-23 18:56:30 +00:00
|
|
|
*
|
2004-08-20 19:57:11 +00:00
|
|
|
* Create a logical brush with a given style, color or pattern.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* brush [I] Pointer to a LOGBRUSH structure describing the desired brush.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* A handle to the created brush, or a NULL handle if the brush cannot be
|
|
|
|
* created.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
|
|
|
* - Windows 95 and earlier cannot create brushes from bitmaps or DIBs larger
|
|
|
|
* than 8x8 pixels. If a larger bitmap is given, only a portion of the bitmap
|
|
|
|
* is used.
|
1993-09-04 10:09:32 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH * brush )
|
1993-09-04 10:09:32 +00:00
|
|
|
{
|
2002-10-03 19:48:59 +00:00
|
|
|
BRUSHOBJ * ptr;
|
2000-08-19 21:38:55 +00:00
|
|
|
HBRUSH hbrush;
|
2002-10-03 19:48:59 +00:00
|
|
|
|
2011-12-29 15:17:44 +00:00
|
|
|
if (!(ptr = HeapAlloc( GetProcessHeap(), 0, sizeof(*ptr) ))) return 0;
|
2009-01-28 17:43:06 +00:00
|
|
|
|
2011-11-02 19:58:36 +00:00
|
|
|
ptr->logbrush = *brush;
|
2002-10-03 19:48:59 +00:00
|
|
|
|
2011-12-29 15:17:44 +00:00
|
|
|
if (store_brush_pattern( &ptr->logbrush, &ptr->pattern ) &&
|
2012-10-17 11:48:45 +00:00
|
|
|
(hbrush = alloc_gdi_handle( ptr, OBJ_BRUSH, &brush_funcs )))
|
2009-01-28 17:43:06 +00:00
|
|
|
{
|
|
|
|
TRACE("%p\n", hbrush);
|
|
|
|
return hbrush;
|
|
|
|
}
|
2002-10-03 19:48:59 +00:00
|
|
|
|
2011-12-29 15:17:44 +00:00
|
|
|
free_brush_pattern( &ptr->pattern );
|
2009-01-28 17:43:06 +00:00
|
|
|
HeapFree( GetProcessHeap(), 0, ptr );
|
2002-10-03 19:48:59 +00:00
|
|
|
return 0;
|
1996-11-02 14:24:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-02-14 23:11:17 +00:00
|
|
|
* CreateHatchBrush (GDI32.@)
|
2004-08-20 19:57:11 +00:00
|
|
|
*
|
|
|
|
* Create a logical brush with a hatched pattern.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* style [I] Direction of lines for the hatch pattern (HS_* values from "wingdi.h")
|
|
|
|
* color [I] Colour of the hatched pattern
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* A handle to the created brush, or a NULL handle if the brush cannot
|
|
|
|
* be created.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* - This function uses CreateBrushIndirect() to create the brush.
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
1996-11-02 14:24:07 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
HBRUSH WINAPI CreateHatchBrush( INT style, COLORREF color )
|
1996-11-02 14:24:07 +00:00
|
|
|
{
|
1999-04-22 16:27:50 +00:00
|
|
|
LOGBRUSH logbrush;
|
|
|
|
|
2006-10-12 20:56:56 +00:00
|
|
|
TRACE("%d %06x\n", style, color );
|
1999-04-22 16:27:50 +00:00
|
|
|
|
|
|
|
logbrush.lbStyle = BS_HATCHED;
|
|
|
|
logbrush.lbColor = color;
|
|
|
|
logbrush.lbHatch = style;
|
|
|
|
|
1999-02-26 11:11:13 +00:00
|
|
|
return CreateBrushIndirect( &logbrush );
|
1996-11-02 14:24:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1993-09-04 10:09:32 +00:00
|
|
|
/***********************************************************************
|
2001-02-14 23:11:17 +00:00
|
|
|
* CreatePatternBrush (GDI32.@)
|
2004-08-20 19:57:11 +00:00
|
|
|
*
|
|
|
|
* Create a logical brush with a pattern from a bitmap.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hbitmap [I] Bitmap containing pattern for the brush
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* A handle to the created brush, or a NULL handle if the brush cannot
|
|
|
|
* be created.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* - This function uses CreateBrushIndirect() to create the brush.
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
1993-09-04 10:09:32 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
HBRUSH WINAPI CreatePatternBrush( HBITMAP hbitmap )
|
1993-09-04 10:09:32 +00:00
|
|
|
{
|
1999-02-26 11:11:13 +00:00
|
|
|
LOGBRUSH logbrush = { BS_PATTERN, 0, 0 };
|
2002-11-22 22:16:53 +00:00
|
|
|
TRACE("%p\n", hbitmap );
|
1993-09-04 10:09:32 +00:00
|
|
|
|
2002-10-03 19:48:59 +00:00
|
|
|
logbrush.lbHatch = (ULONG_PTR)hbitmap;
|
2002-05-31 18:43:22 +00:00
|
|
|
return CreateBrushIndirect( &logbrush );
|
1996-11-02 14:24:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1993-09-04 10:09:32 +00:00
|
|
|
/***********************************************************************
|
2001-02-14 23:11:17 +00:00
|
|
|
* CreateDIBPatternBrush (GDI32.@)
|
1998-11-08 15:07:22 +00:00
|
|
|
*
|
2004-08-20 19:57:11 +00:00
|
|
|
* Create a logical brush with a pattern from a DIB.
|
1998-11-08 15:07:22 +00:00
|
|
|
*
|
2004-08-20 19:57:11 +00:00
|
|
|
* PARAMS
|
|
|
|
* hbitmap [I] Global object containing BITMAPINFO structure for the pattern
|
|
|
|
* coloruse [I] Specifies color format, if provided
|
1998-11-08 15:07:22 +00:00
|
|
|
*
|
|
|
|
* RETURNS
|
2004-08-20 19:57:11 +00:00
|
|
|
* A handle to the created brush, or a NULL handle if the brush cannot
|
|
|
|
* be created.
|
1998-11-08 15:07:22 +00:00
|
|
|
*
|
2004-08-20 19:57:11 +00:00
|
|
|
* NOTES
|
|
|
|
* - This function uses CreateBrushIndirect() to create the brush.
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
|
|
|
* - This function is for compatibility only. CreateDIBPatternBrushPt() should
|
|
|
|
* be used instead.
|
1993-09-04 10:09:32 +00:00
|
|
|
*/
|
2004-08-20 19:57:11 +00:00
|
|
|
HBRUSH WINAPI CreateDIBPatternBrush( HGLOBAL hbitmap, UINT coloruse )
|
1993-09-04 10:09:32 +00:00
|
|
|
{
|
1999-04-22 16:27:50 +00:00
|
|
|
LOGBRUSH logbrush;
|
2002-05-31 23:06:46 +00:00
|
|
|
|
2002-11-22 22:16:53 +00:00
|
|
|
TRACE("%p\n", hbitmap );
|
1993-09-04 10:09:32 +00:00
|
|
|
|
1999-04-22 16:27:50 +00:00
|
|
|
logbrush.lbStyle = BS_DIBPATTERN;
|
|
|
|
logbrush.lbColor = coloruse;
|
1993-09-04 10:09:32 +00:00
|
|
|
|
2005-09-12 11:19:56 +00:00
|
|
|
logbrush.lbHatch = (ULONG_PTR)hbitmap;
|
1993-09-04 10:09:32 +00:00
|
|
|
|
1999-02-26 11:11:13 +00:00
|
|
|
return CreateBrushIndirect( &logbrush );
|
1998-11-08 15:07:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-02-14 23:11:17 +00:00
|
|
|
* CreateDIBPatternBrushPt (GDI32.@)
|
1998-11-08 15:07:22 +00:00
|
|
|
*
|
2004-08-20 19:57:11 +00:00
|
|
|
* Create a logical brush with a pattern from a DIB.
|
1998-11-08 15:07:22 +00:00
|
|
|
*
|
2004-08-20 19:57:11 +00:00
|
|
|
* PARAMS
|
|
|
|
* data [I] Pointer to a BITMAPINFO structure and image data for the pattern
|
|
|
|
* coloruse [I] Specifies color format, if provided
|
1998-11-08 15:07:22 +00:00
|
|
|
*
|
2004-08-20 19:57:11 +00:00
|
|
|
* RETURNS
|
|
|
|
* A handle to the created brush, or a NULL handle if the brush cannot
|
|
|
|
* be created.
|
2002-05-31 23:06:46 +00:00
|
|
|
*
|
2004-08-20 19:57:11 +00:00
|
|
|
* NOTES
|
|
|
|
* - This function uses CreateBrushIndirect() to create the brush.
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
1998-11-08 15:07:22 +00:00
|
|
|
*/
|
2004-08-20 19:57:11 +00:00
|
|
|
HBRUSH WINAPI CreateDIBPatternBrushPt( const void* data, UINT coloruse )
|
1998-11-08 15:07:22 +00:00
|
|
|
{
|
2009-01-26 10:01:12 +00:00
|
|
|
const BITMAPINFO *info=data;
|
1999-05-08 12:50:36 +00:00
|
|
|
LOGBRUSH logbrush;
|
2002-05-31 23:06:46 +00:00
|
|
|
|
2003-11-13 20:49:54 +00:00
|
|
|
if (!data)
|
|
|
|
return NULL;
|
|
|
|
|
2006-10-12 20:56:56 +00:00
|
|
|
TRACE("%p %dx%d %dbpp\n", info, info->bmiHeader.biWidth,
|
1999-04-18 12:07:00 +00:00
|
|
|
info->bmiHeader.biHeight, info->bmiHeader.biBitCount);
|
1998-11-08 15:07:22 +00:00
|
|
|
|
1999-10-23 18:56:30 +00:00
|
|
|
logbrush.lbStyle = BS_DIBPATTERNPT;
|
1999-05-08 12:50:36 +00:00
|
|
|
logbrush.lbColor = coloruse;
|
2005-09-12 11:19:56 +00:00
|
|
|
logbrush.lbHatch = (ULONG_PTR)data;
|
1998-11-08 15:07:22 +00:00
|
|
|
|
1999-02-26 11:11:13 +00:00
|
|
|
return CreateBrushIndirect( &logbrush );
|
1993-09-04 10:09:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1996-11-02 14:24:07 +00:00
|
|
|
/***********************************************************************
|
2001-02-14 23:11:17 +00:00
|
|
|
* CreateSolidBrush (GDI32.@)
|
2004-08-20 19:57:11 +00:00
|
|
|
*
|
|
|
|
* Create a logical brush consisting of a single colour.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* color [I] Colour to make the solid brush
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* A handle to the newly created brush, or a NULL handle if the brush cannot
|
|
|
|
* be created.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* - This function uses CreateBrushIndirect() to create the brush.
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
1996-11-02 14:24:07 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
HBRUSH WINAPI CreateSolidBrush( COLORREF color )
|
1993-09-04 10:09:32 +00:00
|
|
|
{
|
1999-04-22 16:27:50 +00:00
|
|
|
LOGBRUSH logbrush;
|
|
|
|
|
2006-10-12 20:56:56 +00:00
|
|
|
TRACE("%06x\n", color );
|
1999-04-22 16:27:50 +00:00
|
|
|
|
|
|
|
logbrush.lbStyle = BS_SOLID;
|
|
|
|
logbrush.lbColor = color;
|
|
|
|
logbrush.lbHatch = 0;
|
|
|
|
|
1999-02-26 11:11:13 +00:00
|
|
|
return CreateBrushIndirect( &logbrush );
|
1993-09-04 10:09:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 18:50:11 +00:00
|
|
|
/***********************************************************************
|
2001-02-14 23:11:17 +00:00
|
|
|
* SetBrushOrgEx (GDI32.@)
|
2004-08-20 19:57:11 +00:00
|
|
|
*
|
|
|
|
* Set the brush origin for a device context.
|
|
|
|
*
|
|
|
|
* PARAMS
|
2011-07-27 11:38:43 +00:00
|
|
|
* hdc [I] Device context to set the brush origin for
|
2004-08-20 19:57:11 +00:00
|
|
|
* x [I] New x origin
|
2011-07-27 11:38:43 +00:00
|
|
|
* y [I] New y origin
|
2004-08-20 19:57:11 +00:00
|
|
|
* oldorg [O] If non NULL, destination for previously set brush origin.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE. The origin is set to (x,y), and oldorg is updated if given.
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 18:50:11 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
BOOL WINAPI SetBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 18:50:11 +00:00
|
|
|
{
|
2008-02-05 16:35:40 +00:00
|
|
|
DC *dc = get_dc_ptr( hdc );
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 18:50:11 +00:00
|
|
|
|
|
|
|
if (!dc) return FALSE;
|
|
|
|
if (oldorg)
|
|
|
|
{
|
2000-11-05 02:05:07 +00:00
|
|
|
oldorg->x = dc->brushOrgX;
|
|
|
|
oldorg->y = dc->brushOrgY;
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 18:50:11 +00:00
|
|
|
}
|
2000-11-05 02:05:07 +00:00
|
|
|
dc->brushOrgX = x;
|
|
|
|
dc->brushOrgY = y;
|
2008-02-05 16:35:40 +00:00
|
|
|
release_dc_ptr( dc );
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 18:50:11 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 19:17:50 +00:00
|
|
|
/***********************************************************************
|
2001-02-14 23:11:17 +00:00
|
|
|
* FixBrushOrgEx (GDI32.@)
|
2004-08-20 19:57:11 +00:00
|
|
|
*
|
|
|
|
* See SetBrushOrgEx.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* This function is no longer documented by MSDN, but in Win95 GDI32 it
|
|
|
|
* is the same as SetBrushOrgEx().
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 19:17:50 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
BOOL WINAPI FixBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 19:17:50 +00:00
|
|
|
{
|
|
|
|
return SetBrushOrgEx(hdc,x,y,oldorg);
|
|
|
|
}
|
|
|
|
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 18:50:11 +00:00
|
|
|
|
2002-05-31 18:43:22 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* BRUSH_SelectObject
|
|
|
|
*/
|
2007-09-27 18:14:13 +00:00
|
|
|
static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc )
|
2002-05-31 18:43:22 +00:00
|
|
|
{
|
2007-09-27 18:14:13 +00:00
|
|
|
BRUSHOBJ *brush;
|
|
|
|
HGDIOBJ ret = 0;
|
|
|
|
DC *dc = get_dc_ptr( hdc );
|
2002-05-31 18:43:22 +00:00
|
|
|
|
2008-02-05 20:17:28 +00:00
|
|
|
if (!dc)
|
|
|
|
{
|
|
|
|
SetLastError( ERROR_INVALID_HANDLE );
|
|
|
|
return 0;
|
|
|
|
}
|
2002-05-31 18:43:22 +00:00
|
|
|
|
2009-01-28 15:20:56 +00:00
|
|
|
if ((brush = GDI_GetObjPtr( handle, OBJ_BRUSH )))
|
2007-09-27 18:14:13 +00:00
|
|
|
{
|
2011-03-09 20:19:09 +00:00
|
|
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSelectBrush );
|
2011-12-29 18:49:41 +00:00
|
|
|
struct brush_pattern *pattern = &brush->pattern;
|
2011-03-09 20:19:09 +00:00
|
|
|
|
2012-05-23 19:12:04 +00:00
|
|
|
if (!pattern->info) pattern = NULL;
|
2007-09-27 18:14:13 +00:00
|
|
|
|
2008-02-05 20:17:28 +00:00
|
|
|
GDI_inc_ref_count( handle );
|
|
|
|
GDI_ReleaseObj( handle );
|
|
|
|
|
2011-12-29 18:49:41 +00:00
|
|
|
if (!physdev->funcs->pSelectBrush( physdev, handle, pattern ))
|
2008-02-05 20:17:28 +00:00
|
|
|
{
|
|
|
|
GDI_dec_ref_count( handle );
|
|
|
|
}
|
|
|
|
else
|
2007-09-27 18:57:02 +00:00
|
|
|
{
|
|
|
|
ret = dc->hBrush;
|
|
|
|
dc->hBrush = handle;
|
|
|
|
GDI_dec_ref_count( ret );
|
|
|
|
}
|
2007-09-27 18:14:13 +00:00
|
|
|
}
|
|
|
|
release_dc_ptr( dc );
|
2002-05-31 18:43:22 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1993-09-04 10:09:32 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* BRUSH_DeleteObject
|
|
|
|
*/
|
2009-01-27 15:19:37 +00:00
|
|
|
static BOOL BRUSH_DeleteObject( HGDIOBJ handle )
|
1993-09-04 10:09:32 +00:00
|
|
|
{
|
2009-01-28 17:45:21 +00:00
|
|
|
BRUSHOBJ *brush = free_gdi_handle( handle );
|
2002-05-31 18:43:22 +00:00
|
|
|
|
2009-01-27 15:19:37 +00:00
|
|
|
if (!brush) return FALSE;
|
2011-12-29 15:17:44 +00:00
|
|
|
free_brush_pattern( &brush->pattern );
|
2009-01-28 17:45:21 +00:00
|
|
|
return HeapFree( GetProcessHeap(), 0, brush );
|
1993-09-04 10:09:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1996-11-02 14:24:07 +00:00
|
|
|
/***********************************************************************
|
2000-03-28 20:22:59 +00:00
|
|
|
* BRUSH_GetObject
|
1996-11-02 14:24:07 +00:00
|
|
|
*/
|
2009-01-27 15:30:43 +00:00
|
|
|
static INT BRUSH_GetObject( HGDIOBJ handle, INT count, LPVOID buffer )
|
1993-09-04 10:09:32 +00:00
|
|
|
{
|
2009-01-28 15:20:56 +00:00
|
|
|
BRUSHOBJ *brush = GDI_GetObjPtr( handle, OBJ_BRUSH );
|
2003-07-26 20:39:46 +00:00
|
|
|
|
2009-01-27 15:30:43 +00:00
|
|
|
if (!brush) return 0;
|
|
|
|
if (buffer)
|
|
|
|
{
|
|
|
|
if (count > sizeof(brush->logbrush)) count = sizeof(brush->logbrush);
|
|
|
|
memcpy( buffer, &brush->logbrush, count );
|
|
|
|
}
|
|
|
|
else count = sizeof(brush->logbrush);
|
|
|
|
GDI_ReleaseObj( handle );
|
1993-09-04 10:09:32 +00:00
|
|
|
return count;
|
|
|
|
}
|