Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
741325b8
Commit
741325b8
authored
Jun 13, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure edit and listbox controls are of same ASCII/Unicode style as
the combo box. Fixed a few MBCS issues with WM_GETTEXTLENGTH handling.
parent
935e3df3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
15 deletions
+33
-15
combo.c
controls/combo.c
+26
-12
edit.c
controls/edit.c
+3
-1
listbox.c
controls/listbox.c
+4
-2
No files found.
controls/combo.c
View file @
741325b8
...
...
@@ -492,7 +492,8 @@ static LRESULT COMBO_WindowPosChanging(
/***********************************************************************
* COMBO_Create
*/
static
LRESULT
COMBO_Create
(
HWND
hwnd
,
LPHEADCOMBO
lphc
,
HWND
hwndParent
,
LONG
style
)
static
LRESULT
COMBO_Create
(
HWND
hwnd
,
LPHEADCOMBO
lphc
,
HWND
hwndParent
,
LONG
style
,
BOOL
unicode
)
{
static
const
WCHAR
clbName
[]
=
{
'C'
,
'o'
,
'm'
,
'b'
,
'o'
,
'L'
,
'B'
,
'o'
,
'x'
,
0
};
static
const
WCHAR
editName
[]
=
{
'E'
,
'd'
,
'i'
,
't'
,
0
};
...
...
@@ -574,10 +575,16 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
}
}
lphc
->
hWndLBox
=
CreateWindowExW
(
lbeExStyle
,
clbName
,
NULL
,
lbeStyle
,
if
(
unicode
)
lphc
->
hWndLBox
=
CreateWindowExW
(
lbeExStyle
,
clbName
,
NULL
,
lbeStyle
,
lphc
->
droppedRect
.
left
,
lphc
->
droppedRect
.
top
,
lphc
->
droppedRect
.
right
-
lphc
->
droppedRect
.
left
,
lphc
->
droppedRect
.
bottom
-
lphc
->
droppedRect
.
top
,
hwnd
,
(
HMENU
)
ID_CB_LISTBOX
,
GetWindowLongA
(
hwnd
,
GWL_HINSTANCE
),
lphc
);
else
lphc
->
hWndLBox
=
CreateWindowExA
(
lbeExStyle
,
"ComboLBox"
,
NULL
,
lbeStyle
,
lphc
->
droppedRect
.
left
,
lphc
->
droppedRect
.
top
,
lphc
->
droppedRect
.
right
-
lphc
->
droppedRect
.
left
,
...
...
@@ -610,10 +617,15 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
if
(
!
IsWindowEnabled
(
hwnd
))
lbeStyle
|=
WS_DISABLED
;
lphc
->
hWndEdit
=
CreateWindowExW
(
0
,
editName
,
NULL
,
lbeStyle
,
if
(
unicode
)
lphc
->
hWndEdit
=
CreateWindowExW
(
0
,
editName
,
NULL
,
lbeStyle
,
lphc
->
textRect
.
left
,
lphc
->
textRect
.
top
,
lphc
->
textRect
.
right
-
lphc
->
textRect
.
left
,
lphc
->
textRect
.
bottom
-
lphc
->
textRect
.
top
,
hwnd
,
(
HMENU
)
ID_CB_EDIT
,
GetWindowLongA
(
hwnd
,
GWL_HINSTANCE
),
NULL
);
else
lphc
->
hWndEdit
=
CreateWindowExA
(
0
,
"Edit"
,
NULL
,
lbeStyle
,
lphc
->
textRect
.
left
,
lphc
->
textRect
.
top
,
lphc
->
textRect
.
right
-
lphc
->
textRect
.
left
,
lphc
->
textRect
.
bottom
-
lphc
->
textRect
.
top
,
...
...
@@ -1907,7 +1919,7 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message,
hwndParent
=
((
LPCREATESTRUCTA
)
lParam
)
->
hwndParent
;
style
=
((
LPCREATESTRUCTA
)
lParam
)
->
style
;
}
return
COMBO_Create
(
hwnd
,
lphc
,
hwndParent
,
style
);
return
COMBO_Create
(
hwnd
,
lphc
,
hwndParent
,
style
,
unicode
);
}
case
WM_PRINTCLIENT
:
...
...
@@ -1975,7 +1987,8 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message,
{
int
j
=
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETCURSEL
,
0
,
0
);
if
(
j
==
-
1
)
return
0
;
return
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETTEXTLEN
,
j
,
0
);
return
unicode
?
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETTEXTLEN
,
j
,
0
)
:
SendMessageA
(
lphc
->
hWndLBox
,
LB_GETTEXTLEN
,
j
,
0
);
}
else
if
(
lphc
->
wState
&
CBF_EDIT
)
{
...
...
@@ -2218,7 +2231,8 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message,
wParam
=
(
INT
)(
INT16
)
wParam
;
/* fall through */
case
CB_GETLBTEXTLEN
:
return
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETTEXTLEN
,
wParam
,
0
);
return
unicode
?
SendMessageW
(
lphc
->
hWndLBox
,
LB_GETTEXTLEN
,
wParam
,
0
)
:
SendMessageA
(
lphc
->
hWndLBox
,
LB_GETTEXTLEN
,
wParam
,
0
);
case
CB_GETITEMDATA16
:
wParam
=
(
INT
)(
INT16
)
wParam
;
/* fall through */
...
...
controls/edit.c
View file @
741325b8
...
...
@@ -969,7 +969,9 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
case
WM_GETTEXTLENGTH
:
DPRINTF_EDIT_MSG32
(
"WM_GETTEXTLENGTH"
);
result
=
strlenW
(
es
->
text
);
if
(
unicode
)
result
=
strlenW
(
es
->
text
);
else
result
=
WideCharToMultiByte
(
CP_ACP
,
0
,
es
->
text
,
strlenW
(
es
->
text
),
NULL
,
0
,
NULL
,
NULL
);
break
;
case
WM_HSCROLL
:
...
...
controls/listbox.c
View file @
741325b8
...
...
@@ -2608,8 +2608,10 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
case
LB_GETTEXTLEN
:
if
((
INT
)
wParam
>=
descr
->
nb_items
||
(
INT
)
wParam
<
0
)
return
LB_ERR
;
return
(
HAS_STRINGS
(
descr
)
?
strlenW
(
descr
->
items
[
wParam
].
str
)
:
sizeof
(
DWORD
));
if
(
!
HAS_STRINGS
(
descr
))
return
sizeof
(
DWORD
);
if
(
unicode
)
return
strlenW
(
descr
->
items
[
wParam
].
str
);
return
WideCharToMultiByte
(
CP_ACP
,
0
,
descr
->
items
[
wParam
].
str
,
strlenW
(
descr
->
items
[
wParam
].
str
),
NULL
,
0
,
NULL
,
NULL
);
case
LB_GETCURSEL16
:
case
LB_GETCURSEL
:
...
...
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