Commit d44027e2 authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

Apply HIMETRIC transformation on icons, just like bitmaps.

parent ca737101
......@@ -1264,6 +1264,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
case 0x0000: { /* ICON , first word is dwReserved */
HICON hicon;
CURSORICONFILEDIR *cifd = (CURSORICONFILEDIR*)xbuf;
HDC hdcRef;
int i;
/*
......@@ -1309,8 +1310,12 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
} else {
This->desc.picType = PICTYPE_ICON;
This->desc.u.icon.hicon = hicon;
This->himetricWidth = cifd->idEntries[i].bWidth;
This->himetricHeight = cifd->idEntries[i].bHeight;
This->origWidth = cifd->idEntries[i].bWidth;
This->origHeight = cifd->idEntries[i].bHeight;
hdcRef = CreateCompatibleDC(0);
This->himetricWidth =(cifd->idEntries[i].bWidth *2540)/GetDeviceCaps(hdcRef, LOGPIXELSX);
This->himetricHeight=(cifd->idEntries[i].bHeight*2540)/GetDeviceCaps(hdcRef, LOGPIXELSY);
DeleteDC(hdcRef);
hr = S_OK;
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment