Changeset 6163 for trunk/src


Ignore:
Timestamp:
Jul 4, 2001, 10:03:55 AM (24 years ago)
Author:
sandervl
Message:

workaround for 16 bits gdi handles

Location:
trunk/src/gdi32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/dibitmap.cpp

    r5992 r6163  
    1 /* $Id: dibitmap.cpp,v 1.23 2001-06-13 10:29:05 sandervl Exp $ */
     1/* $Id: dibitmap.cpp,v 1.24 2001-07-04 08:03:54 sandervl Exp $ */
    22
    33/*
     
    139139//******************************************************************************
    140140//******************************************************************************
    141 HBITMAP WIN32API CreateBitmapIndirect( const BITMAP * arg1)
    142 {
    143     dprintf(("GDI32: CreateBitmapIndirect"));
    144     return O32_CreateBitmapIndirect(arg1);
     141HBITMAP WIN32API CreateBitmapIndirect( const BITMAP *pBitmap)
     142{
     143    HBITMAP hBitmap;
     144
     145    dprintf(("GDI32: CreateBitmapIndirect (%d,%d) bpp %d bits %x", pBitmap->bmWidth, pBitmap->bmHeight, pBitmap->bmBitsPixel, pBitmap->bmBits));
     146    hBitmap = O32_CreateBitmapIndirect(pBitmap);
     147    dprintf(("GDI32: CreateBitmapIndirect returned %x", hBitmap));
     148    return hBitmap;
    145149}
    146150//******************************************************************************
  • trunk/src/gdi32/objhandle.cpp

    r5472 r6163  
    1 /* $Id: objhandle.cpp,v 1.13 2001-04-04 09:02:15 sandervl Exp $ */
     1/* $Id: objhandle.cpp,v 1.14 2001-07-04 08:03:55 sandervl Exp $ */
    22/*
    33 * Win32 Handle Management Code for OS/2
     
    2929#include "dbglocal.h"
    3030
     31//TODO: must use 16 bits gdi object handles
     32#define GDIOBJ_PREFIX 0xe7000000
     33
    3134//******************************************************************************
    3235
     
    142145
    143146  dprintf(("GDI32: GetObject %X %X %X\n", hObject, size, lpBuffer));
     147  //TODO: must use 16 bits gdi object handles
     148  if(HIWORD(hObject) == 0) {
     149        hObject |= GDIOBJ_PREFIX;
     150  }
    144151  if(lpBuffer == NULL)
    145152  { //return required size if buffer pointer == NULL
     
    200207
    201208  dprintf(("GDI32: GetObjectW %X, %d %X", hObject, size, lpBuffer));
     209
     210  //TODO: must use 16 bits gdi object handles
     211  if(HIWORD(hObject) == 0) {
     212        hObject |= GDIOBJ_PREFIX;
     213  }
    202214  objtype = GetObjectType(hObject);
    203215
     
    237249{
    238250 HGDIOBJ rc;
    239  DWORD   handleType = GetObjectType(hObj);
     251 DWORD   handleType;
    240252
    241253    dprintf2(("GDI32: SelectObject %x %x type %x", hdc, hObj, handleType));
    242254
     255    //TODO: must use 16 bits gdi object handles
     256    if(HIWORD(hObj) == 0) {
     257        hObj |= GDIOBJ_PREFIX;
     258    }
     259
     260    handleType = GetObjectType(hObj);
    243261    if(handleType == GDIOBJ_REGION) {
    244262        //Return complexity here; not previously selected clip region
     
    306324{
    307325    dprintf2(("GDI32: GetObjectType %x", hObj));
     326    //TODO: must use 16 bits gdi object handles
     327    if(HIWORD(hObj) == 0) {
     328        hObj |= GDIOBJ_PREFIX;
     329    }
    308330    if(ObjGetHandleType(hObj) == GDIOBJ_REGION) {
    309331        SetLastError(ERROR_SUCCESS);
     
    321343    dprintf(("GDI32: DeleteObject %x", hObj));
    322344
     345    //TODO: must use 16 bits gdi object handles
     346    if(HIWORD(hObj) == 0) {
     347        hObj |= GDIOBJ_PREFIX;
     348    }
    323349    //System objects can't be deleted (TODO: any others?? (fonts?))!!!!)
    324350    type = GetObjectType(hObj);
Note: See TracChangeset for help on using the changeset viewer.