Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
c4a28490
Commit
c4a28490
authored
Apr 23, 2014
by
Andrew Eikum
Committed by
Alexandre Julliard
Apr 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Allow setting horizontal extent even without WS_HSCROLL.
parent
5d31c1e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
3 deletions
+39
-3
listbox.c
dlls/user32/listbox.c
+3
-3
listbox.c
dlls/user32/tests/listbox.c
+36
-0
No files found.
dlls/user32/listbox.c
View file @
c4a28490
...
...
@@ -83,7 +83,7 @@ typedef struct
INT
item_height
;
/* Default item height */
INT
page_size
;
/* Items per listbox page */
INT
column_width
;
/* Column width for multi-column listboxes */
INT
horz_extent
;
/* Horizontal extent
(0 if no hscroll)
*/
INT
horz_extent
;
/* Horizontal extent */
INT
horz_pos
;
/* Horizontal position */
INT
nb_tabs
;
/* Number of tabs in array */
INT
*
tabs
;
/* Array of tabs */
...
...
@@ -1239,7 +1239,7 @@ static void LISTBOX_SetHorizontalPos( LB_DESCR *descr, INT pos )
*/
static
LRESULT
LISTBOX_SetHorizontalExtent
(
LB_DESCR
*
descr
,
INT
extent
)
{
if
(
!
descr
->
horz_extent
||
(
descr
->
style
&
LBS_MULTICOLUMN
)
)
if
(
descr
->
style
&
LBS_MULTICOLUMN
)
return
LB_OKAY
;
if
(
extent
<=
0
)
extent
=
1
;
if
(
extent
==
descr
->
horz_extent
)
return
LB_OKAY
;
...
...
@@ -2485,7 +2485,7 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
descr
->
item_height
=
1
;
descr
->
page_size
=
1
;
descr
->
column_width
=
150
;
descr
->
horz_extent
=
(
descr
->
style
&
WS_HSCROLL
)
?
1
:
0
;
descr
->
horz_extent
=
0
;
descr
->
horz_pos
=
0
;
descr
->
nb_tabs
=
0
;
descr
->
tabs
=
NULL
;
...
...
dlls/user32/tests/listbox.c
View file @
c4a28490
...
...
@@ -1617,6 +1617,41 @@ static void test_missing_lbuttonup( void )
DestroyWindow
(
parent
);
}
static
void
test_extents
(
void
)
{
HWND
listbox
,
parent
;
DWORD
res
;
parent
=
create_parent
();
listbox
=
create_listbox
(
WS_CHILD
|
WS_VISIBLE
,
parent
);
res
=
SendMessageA
(
listbox
,
LB_GETHORIZONTALEXTENT
,
0
,
0
);
ok
(
res
==
0
,
"Got wrong initial horizontal extent: %u
\n
"
,
res
);
SendMessageA
(
listbox
,
LB_SETHORIZONTALEXTENT
,
64
,
0
);
res
=
SendMessageA
(
listbox
,
LB_GETHORIZONTALEXTENT
,
0
,
0
);
ok
(
res
==
64
,
"Got wrong horizontal extent: %u
\n
"
,
res
);
DestroyWindow
(
listbox
);
listbox
=
create_listbox
(
WS_CHILD
|
WS_VISIBLE
|
WS_HSCROLL
,
parent
);
res
=
SendMessageA
(
listbox
,
LB_GETHORIZONTALEXTENT
,
0
,
0
);
ok
(
res
==
0
,
"Got wrong initial horizontal extent: %u
\n
"
,
res
);
SendMessageA
(
listbox
,
LB_SETHORIZONTALEXTENT
,
64
,
0
);
res
=
SendMessageA
(
listbox
,
LB_GETHORIZONTALEXTENT
,
0
,
0
);
ok
(
res
==
64
,
"Got wrong horizontal extent: %u
\n
"
,
res
);
DestroyWindow
(
listbox
);
DestroyWindow
(
parent
);
}
START_TEST
(
listbox
)
{
const
struct
listbox_test
SS
=
...
...
@@ -1698,4 +1733,5 @@ START_TEST(listbox)
test_set_count
();
test_GetListBoxInfo
();
test_missing_lbuttonup
();
test_extents
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment