[SHELL32]

- properly calculate the size of the open with icon control
CORE-3904

svn path=/trunk/; revision=66756
This commit is contained in:
Kamil Hornicek 2015-03-17 15:33:38 +00:00
parent 0b7e5d37e3
commit 43c38210ce

View file

@ -306,8 +306,10 @@ CFileDefExt::InitOpensWithField(HWND hwndDlg)
ShowWindow(hIconCtrl, SW_SHOW);
RECT rcIcon, rcDescr;
GetWindowRect(hIconCtrl, &rcIcon);
if (rcIcon.left == rcIcon.right)
ERR("Icon control has invalid width: %d-%d\n", rcIcon.left, rcIcon.right);
rcIcon.right = rcIcon.left + GetSystemMetrics(SM_CXSMICON);
rcIcon.bottom = rcIcon.top + GetSystemMetrics(SM_CYSMICON);
MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rcIcon, 2);
GetWindowRect(hDescrCtrl, &rcDescr);
MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rcDescr, 2);