[SHELL32]
authorKamil Hornicek <kamil.hornicek@reactos.org>
Tue, 17 Mar 2015 15:33:38 +0000 (15:33 +0000)
committerKamil Hornicek <kamil.hornicek@reactos.org>
Tue, 17 Mar 2015 15:33:38 +0000 (15:33 +0000)
- properly calculate the size of the open with icon control
CORE-3904

svn path=/trunk/; revision=66756

reactos/dll/win32/shell32/dialogs/filedefext.cpp

index 473d9f7..50dde21 100644 (file)
@@ -306,8 +306,10 @@ CFileDefExt::InitOpensWithField(HWND hwndDlg)
                 ShowWindow(hIconCtrl, SW_SHOW);
                 RECT rcIcon, rcDescr;
                 GetWindowRect(hIconCtrl, &rcIcon);
                 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);
                 MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rcIcon, 2);
                 GetWindowRect(hDescrCtrl, &rcDescr);
                 MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rcDescr, 2);