https://git.reactos.org/?p=reactos.git;a=commitdiff;h=62e52c7237294556879890f29e271c2ade129fa3

commit 62e52c7237294556879890f29e271c2ade129fa3
Author:     Jose Carlos Jesus <[email protected]>
AuthorDate: Sat Jul 4 14:11:10 2020 +0100
Commit:     GitHub <[email protected]>
CommitDate: Sat Jul 4 15:11:10 2020 +0200

    [USER32][NTUSER] Fix wrong return from LB_GETLISTBOXINFO (#2168)
    
    And is now consistent with comctl32 and Wine too...
---
 win32ss/user/ntuser/window.c           | 5 +----
 win32ss/user/user32/controls/listbox.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/win32ss/user/ntuser/window.c b/win32ss/user/ntuser/window.c
index c70b6081191..6095ed1b403 100644
--- a/win32ss/user/ntuser/window.c
+++ b/win32ss/user/ntuser/window.c
@@ -3349,10 +3349,7 @@ NtUserGetListBoxInfo(
    {
       LB_DESCR *descr = ((PWND2LB)Wnd)->pLBiv;
       // See Controls ListBox.c:LB_GETLISTBOXINFO must match...
-      if (descr->style & LBS_MULTICOLUMN) //// ReactOS
-         Ret = descr->page_size * descr->column_width;
-      else
-         Ret = descr->page_size;
+      Ret = descr->page_size;
    }
    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
    {
diff --git a/win32ss/user/user32/controls/listbox.c 
b/win32ss/user/user32/controls/listbox.c
index 8e909f9857e..195241d1884 100644
--- a/win32ss/user/user32/controls/listbox.c
+++ b/win32ss/user/user32/controls/listbox.c
@@ -3055,10 +3055,7 @@ LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT 
msg,
         return LB_OKAY;
 
     case LB_GETLISTBOXINFO:
-        if (descr->style & LBS_MULTICOLUMN) //// ReactOS
-           return descr->page_size * descr->column_width;
-        else
-           return descr->page_size;
+        return descr->page_size;
 
     case WM_DESTROY:
         return LISTBOX_Destroy( descr );

Reply via email to