OLEPICTURE: Initialize [orig|himetric][Width|Height] for PICTYPE_ICON case

Alex Villaci­s Lasso a_villacis at palosanto.com
Tue Mar 29 14:06:00 CST 2005


Alexandre Julliard wrote:

>Alex Villaci­s Lasso <a_villacis at palosanto.com> writes:
>
>  
>
>>+        hdcRef = CreateCompatibleDC(0);
>>+        pInfoBitmap = (BITMAPINFO *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD));
>>+        pInfoBitmap->bmiHeader.biSize = sizeof(pInfoBitmap->bmiHeader);
>>+        GetDIBits(hdcRef, infoIcon.hbmColor, 0, 0, NULL, pInfoBitmap, DIB_RGB_COLORS);
>>    
>>
>
>This seems a bit overkill just to retrieve the bitmap size. Couldn't
>you simply do a GetObject on the bitmap?
>
>  
>
You are right. I did a copy&paste from the SerializeIcon code. What do 
you think about this patch?

Changelog:
* Initialize [orig|himetric][Width|Height] for PICTYPE_ICON case


-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-oleaut32-olepicture-OLEPictureImpl_SetIcon_try2.patch
Type: text/x-patch
Size: 1510 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050329/5c267b7a/wine-oleaut32-olepicture-OLEPictureImpl_SetIcon_try2.bin


More information about the wine-patches mailing list