- Timestamp:
- Aug 18, 2001, 5:50:32 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/objhandle.cpp
r6262 r6558 1 /* $Id: objhandle.cpp,v 1.1 6 2001-07-09 07:57:38 sandervlExp $ */1 /* $Id: objhandle.cpp,v 1.17 2001-08-18 03:50:32 phaller Exp $ */ 2 2 /* 3 3 * Win32 Handle Management Code for OS/2 … … 343 343 BOOL WIN32API DeleteObject(HANDLE hObj) 344 344 { 345 DWORD type;346 347 345 dprintf(("GDI32: DeleteObject %x", hObj)); 348 346 349 347 //TODO: must use 16 bits gdi object handles 350 if(HIWORD(hObj) == 0) { 348 if(HIWORD(hObj) == 0) 349 { 351 350 hObj |= GDIOBJ_PREFIX; 352 351 } 352 353 353 //System objects can't be deleted (TODO: any others?? (fonts?))!!!!) 354 type = GetObjectType(hObj); 355 if(type == OBJ_PEN && IsSystemPen(hObj)) { 356 SetLastError(ERROR_SUCCESS); 357 return TRUE; 358 } 359 if(type == OBJ_BRUSH && IsSystemBrush(hObj)) { 360 SetLastError(ERROR_SUCCESS); 361 return TRUE; 362 } 363 364 if(ObjGetHandleType(hObj) == GDIOBJ_REGION) { 354 switch (GetObjectType(hObj)) 355 { 356 case OBJ_PEN: 357 if(IsSystemPen(hObj)) 358 { 359 SetLastError(ERROR_SUCCESS); 360 return TRUE; 361 } 362 else 363 break; 364 365 case OBJ_BRUSH: 366 if(IsSystemBrush(hObj)) 367 { 368 SetLastError(ERROR_SUCCESS); 369 return TRUE; 370 } 371 else 372 break; 373 374 // add more system-type objects as required ... 375 } 376 377 if(ObjGetHandleType(hObj) == GDIOBJ_REGION) 378 { 365 379 OSLibDeleteRegion(ObjGetHandleData(hObj, GDIOBJ_REGION)); 366 380 ObjFreeHandle(hObj); … … 368 382 return TRUE; 369 383 } 384 370 385 DIBSection::deleteSection((DWORD)hObj); 371 386 return O32_DeleteObject(hObj);
Note:
See TracChangeset
for help on using the changeset viewer.