Changeset 5390 for trunk/src/gdi32/objhandle.cpp
- Timestamp:
- Mar 27, 2001, 10:47:53 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/objhandle.cpp
r4963 r5390 1 /* $Id: objhandle.cpp,v 1.1 1 2001-01-18 18:13:18sandervl Exp $ */1 /* $Id: objhandle.cpp,v 1.12 2001-03-27 20:47:53 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Handle Management Code for OS/2 … … 177 177 if(DIBSection::getSection() != NULL) 178 178 { 179 DIBSection *dsect = DIBSection::find (hObject);179 DIBSection *dsect = DIBSection::findObj(hObject); 180 180 if(dsect) 181 181 { … … 236 236 { 237 237 HGDIOBJ rc; 238 239 dprintf2(("GDI32: SelectObject %x %x", hdc, hObj)); 240 241 if(ObjGetHandleType(hObj) == GDIOBJ_REGION) { 238 DWORD handleType = GetObjectType(hObj); 239 240 dprintf2(("GDI32: SelectObject %x %x type %x", hdc, hObj, handleType)); 241 242 if(handleType == GDIOBJ_REGION) { 242 243 //Return complexity here; not previously selected clip region 243 244 return (HGDIOBJ)SelectClipRgn(hdc, hObj); 244 245 } 245 246 246 if( DIBSection::getSection() != NULL)247 if(handleType == OBJ_BITMAP && DIBSection::getSection() != NULL) 247 248 { 248 249 DIBSection *dsect; 249 250 250 dsect = DIBSection::find (hdc);251 dsect = DIBSection::findHDC(hdc); 251 252 if(dsect) 252 253 { … … 254 255 dsect->UnSelectDIBObject(); 255 256 } 256 dsect = DIBSection::find ((DWORD)hObj);257 dsect = DIBSection::findObj(hObj); 257 258 if(dsect) 258 259 { … … 261 262 } 262 263 rc = O32_SelectObject(hdc, hObj); 263 if(rc != 0 && DIBSection::getSection != NULL)264 { 265 DIBSection *dsect = DIBSection::find ((DWORD)rc);264 if(rc != 0 && GetObjectType(rc) == OBJ_BITMAP && DIBSection::getSection != NULL) 265 { 266 DIBSection *dsect = DIBSection::findObj(rc); 266 267 if(dsect) 267 268 { … … 270 271 } 271 272 #ifdef USING_OPEN32 272 if( O32_GetObjectType(hObj)== OBJ_BITMAP)273 if(handleType == OBJ_BITMAP) 273 274 { 274 275 //SvL: Open32 messes up the height of the hdc (for windows) … … 286 287 } 287 288 //****************************************************************************** 289 //Called from user32 ReleaseDC (for non CS_OWNDC hdcs) 290 //****************************************************************************** 291 VOID WIN32API UnselectGDIObjects(HDC hdc) 292 { 293 DIBSection *dsect; 294 295 dsect = DIBSection::findHDC(hdc); 296 if(dsect) 297 { 298 //remove previously selected dibsection 299 dsect->UnSelectDIBObject(); 300 } 301 } 302 //****************************************************************************** 288 303 //****************************************************************************** 289 304 DWORD WIN32API GetObjectType( HGDIOBJ hObj)
Note:
See TracChangeset
for help on using the changeset viewer.