Changeset 2267 for trunk/src/gdi32/dibsect.cpp
- Timestamp:
- Dec 30, 1999, 12:21:30 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibsect.cpp
r1966 r2267 1 /* $Id: dibsect.cpp,v 1.1 1 1999-12-04 13:53:12 hughExp $ */1 /* $Id: dibsect.cpp,v 1.12 1999-12-30 11:21:29 sandervl Exp $ */ 2 2 3 3 /* … … 113 113 { 114 114 DIBSection *dsect = section; 115 dprintf (("Increment section starting at %08X\n",dsect));115 dprintf2(("Increment section starting at %08X\n",dsect)); 116 116 117 117 /* @@@PH 98/07/11 fix for dsect->next == NULL */ … … 119 119 (dsect->next != NULL) ) 120 120 { 121 dprintf (("Increment section to %08X\n",dsect->next));121 dprintf2(("Increment section to %08X\n",dsect->next)); 122 122 dsect = dsect->next; 123 123 } … … 125 125 } 126 126 127 dprintf (("Class created"));127 dprintf2(("Class created")); 128 128 } 129 129 //****************************************************************************** … … 366 366 //****************************************************************************** 367 367 //****************************************************************************** 368 int DIBSection::GetDIBSection(int iSize , DIBSECTION *pDIBSection) 369 { 370 if( (sizeof(DIBSECTION)==iSize) && 371 (pDIBSection !=NULL)) 368 int DIBSection::GetDIBSection(int iSize, void *lpBuffer) 369 { 370 DIBSECTION *pDIBSection = (DIBSECTION *)lpBuffer; 371 LPWINBITMAP dsBm = (LPWINBITMAP)lpBuffer; 372 373 if(iSize == sizeof(DIBSECTION)) 372 374 { 373 375 // BITMAP struct … … 400 402 pDIBSection->dsOffset = 0; // TODO: put the correct value here 401 403 402 return 0; //ERROR_SUCCESS 403 } 404 return 87; //ERROR_INVALID_PARAMETER 404 return sizeof(DIBSECTION); 405 } 406 else 407 if(iSize == sizeof(WINBITMAP)) 408 { 409 dsBm->bmType = 0; // TODO: put the correct value here 410 dsBm->bmWidth = pOS2bmp->cx; 411 dsBm->bmHeight = pOS2bmp->cy; 412 dsBm->bmWidthBytes = bmpsize; 413 dsBm->bmPlanes = pOS2bmp->cPlanes; 414 dsBm->bmBitsPixel = pOS2bmp->cBitCount; 415 dsBm->bmBits = bmpBits; 416 return sizeof(WINBITMAP); 417 } 418 return 0; 405 419 406 420 }
Note:
See TracChangeset
for help on using the changeset viewer.