[resend 2/2] comctl32: Enhance LISTVIEW_ApproximateViewRect in LV_VIEW_DETAILS mode.
Vadim Druzhin
cdslow at mail.ru
Wed Oct 11 02:11:50 CDT 2017
Calculate approximated window size
when control does not have real items.
Fix for NTPWEdit (http://cdslow.org.ru/en/ntpwedit/index.html).
Signed-off-by: Vadim Druzhin <cdslow at mail.ru>
---
dlls/comctl32/listview.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 8114222..7e33f7c 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -5362,6 +5362,13 @@ static DWORD LISTVIEW_ApproximateViewRect(const LISTVIEW_INFO *infoPtr, INT nIte
wWidth = rcBox.right - rcBox.left;
wHeight = (rcBox.bottom - rcBox.top) * nItemCount;
}
+ else if (nItemCount > 0)
+ {
+ /* No real items, use approximation */
+ LISTVIEW_GetHeaderRect(infoPtr, 0, &rcBox);
+ wHeight = rcBox.bottom - rcBox.top + infoPtr->nItemHeight * nItemCount;
+ wWidth = infoPtr->nItemWidth;
+ }
else
{
/* use current height and width */
--
2.5.5
More information about the wine-patches
mailing list