user32-ListBox_Size: Add missing file.

This commit is contained in:
Sebastian Lackner 2015-09-27 15:54:48 +02:00
parent e499f1c187
commit f7950d74e6

View File

@ -0,0 +1,33 @@
From 0e6de4c3b7e4250772de4e350b03818e5edb04e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 27 Sep 2015 03:30:43 +0200
Subject: user32: Fix calculation of listbox size when horizontal scrollbar is
present.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Michael Müller <michael@fds-team.de>
---
dlls/user32/listbox.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c
index 2902ac9..c9ef17d 100644
--- a/dlls/user32/listbox.c
+++ b/dlls/user32/listbox.c
@@ -356,8 +356,11 @@ static void LISTBOX_UpdatePage( LB_DESCR *descr )
static void LISTBOX_UpdateSize( LB_DESCR *descr )
{
RECT rect;
+ LONG style = GetWindowLongW( descr->self, GWL_STYLE );
GetClientRect( descr->self, &rect );
+ if (style & WS_HSCROLL)
+ rect.bottom += GetSystemMetrics(SM_CYHSCROLL);
descr->width = rect.right - rect.left;
descr->height = rect.bottom - rect.top;
if (!(descr->style & LBS_NOINTEGRALHEIGHT) && !(descr->style & LBS_OWNERDRAWVARIABLE))
--
2.5.1