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
7c76a79f
Commit
7c76a79f
authored
Sep 01, 2011
by
Bruno Jesus
Committed by
Alexandre Julliard
Sep 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix support for CB_SETDROPPEDWIDTH in combobox.
parent
d9ada792
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
10 deletions
+30
-10
combo.c
dlls/user32/combo.c
+14
-4
combo.c
dlls/user32/tests/combo.c
+16
-6
No files found.
dlls/user32/combo.c
View file @
7c76a79f
...
...
@@ -2112,14 +2112,24 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
return
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETLOCALE
,
0
,
0
);
case
CB_SETLOCALE
:
return
SendMessageW
(
lphc
->
hWndLBox
,
LB_SETLOCALE
,
wParam
,
0
);
case
CB_SETDROPPEDWIDTH
:
if
(
(
CB_GETTYPE
(
lphc
)
==
CBS_SIMPLE
)
||
(
INT
)
wParam
>=
32768
)
return
CB_ERR
;
/* new value must be higher than combobox width */
if
((
INT
)
wParam
>=
lphc
->
droppedRect
.
right
-
lphc
->
droppedRect
.
left
)
lphc
->
droppedWidth
=
wParam
;
else
if
(
wParam
)
lphc
->
droppedWidth
=
0
;
/* recalculate the combobox area */
CBCalcPlacement
(
hwnd
,
lphc
,
&
lphc
->
textRect
,
&
lphc
->
buttonRect
,
&
lphc
->
droppedRect
);
/* fall through */
case
CB_GETDROPPEDWIDTH
:
if
(
lphc
->
droppedWidth
)
return
lphc
->
droppedWidth
;
return
lphc
->
droppedRect
.
right
-
lphc
->
droppedRect
.
left
;
case
CB_SETDROPPEDWIDTH
:
if
(
(
CB_GETTYPE
(
lphc
)
!=
CBS_SIMPLE
)
&&
(
INT
)
wParam
<
32768
)
lphc
->
droppedWidth
=
(
INT
)
wParam
;
return
CB_ERR
;
case
CB_GETDROPPEDCONTROLRECT
:
if
(
lParam
)
CBGetDroppedControlRect
(
lphc
,
(
LPRECT
)
lParam
);
return
CB_OKAY
;
...
...
dlls/user32/tests/combo.c
View file @
7c76a79f
...
...
@@ -406,25 +406,35 @@ static void test_changesize( DWORD style)
}
ddwidth
=
SendMessageA
(
hCombo
,
CB_SETDROPPEDWIDTH
,
-
1
,
0
);
todo_wine
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_GETDROPPEDWIDTH
,
0
,
0
);
todo_wine
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_SETDROPPEDWIDTH
,
0
,
0
);
todo_wine
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_GETDROPPEDWIDTH
,
0
,
0
);
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_SETDROPPEDWIDTH
,
clwidth
-
1
,
0
);
todo_wine
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_GETDROPPEDWIDTH
,
0
,
0
);
todo_wine
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_SETDROPPEDWIDTH
,
clwidth
<<
1
,
0
);
todo_wine
ok
(
ddwidth
==
(
clwidth
<<
1
),
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
<<
1
);
ok
(
ddwidth
==
(
clwidth
<<
1
),
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
<<
1
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_GETDROPPEDWIDTH
,
0
,
0
);
ok
(
ddwidth
==
(
clwidth
<<
1
),
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
<<
1
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_SETDROPPEDWIDTH
,
0
,
0
);
ok
(
ddwidth
==
(
clwidth
<<
1
),
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
<<
1
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_GETDROPPEDWIDTH
,
0
,
0
);
ok
(
ddwidth
==
(
clwidth
<<
1
),
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
<<
1
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_SETDROPPEDWIDTH
,
1
,
0
);
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
ddwidth
=
SendMessageA
(
hCombo
,
CB_GETDROPPEDWIDTH
,
0
,
0
);
ok
(
ddwidth
==
clwidth
+
2
,
"drop-width is %d vs %d
\n
"
,
ddwidth
,
clwidth
+
2
);
DestroyWindow
(
hCombo
);
}
...
...
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