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
643fcffa
Commit
643fcffa
authored
Nov 06, 2000
by
Marcus Meissner
Committed by
Alexandre Julliard
Nov 06, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CBEM_SETITEMW done by example from SETITEMA, converted SETITEMA to use
it.
parent
8fa0fb75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
10 deletions
+37
-10
comboex.c
dlls/comctl32/comboex.c
+37
-10
No files found.
dlls/comctl32/comboex.c
View file @
643fcffa
...
...
@@ -395,12 +395,11 @@ COMBOEX_SetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
return
(
LRESULT
)
himlTemp
;
}
static
LRESULT
COMBOEX_SetItem
A
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
COMBOEX_SetItem
W
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
COMBOEX_INFO
*
infoPtr
=
COMBOEX_GetInfoPtr
(
hwnd
);
COMBOBOXEXITEM
A
*
cit
=
(
COMBOBOXEXITEMA
*
)
lParam
;
COMBOBOXEXITEM
W
*
cit
=
(
COMBOBOXEXITEMW
*
)
lParam
;
INT
index
;
INT
i
;
CBE_ITEMDATA
*
item
;
...
...
@@ -430,15 +429,16 @@ COMBOEX_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* add/change stuff to the internal item structure */
item
->
mask
|=
cit
->
mask
;
if
(
cit
->
mask
&
CBEIF_TEXT
)
{
LPSTR
str
;
LP
W
STR
str
;
INT
len
;
WCHAR
emptystr
[
1
]
=
{
0
};
str
=
cit
->
pszText
;
if
(
!
str
)
str
=
""
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
if
(
!
str
)
str
=
emptystr
;
len
=
strlenW
(
str
);
if
(
len
>
0
)
{
item
->
pszText
=
(
LPWSTR
)
COMCTL32_Alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
item
->
pszText
,
len
);
strcpyW
(
item
->
pszText
,
str
);
}
item
->
cchTextMax
=
cit
->
cchTextMax
;
}
...
...
@@ -458,8 +458,33 @@ COMBOEX_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
return
TRUE
;
}
static
LRESULT
COMBOEX_SetItemA
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
COMBOBOXEXITEMA
*
cit
=
(
COMBOBOXEXITEMA
*
)
lParam
;
COMBOBOXEXITEMW
citW
;
LRESULT
ret
;
memcpy
(
&
citW
,
cit
,
sizeof
(
COMBOBOXEXITEMA
));
if
(
cit
->
mask
&
CBEIF_TEXT
)
{
LPSTR
str
;
INT
len
;
str
=
cit
->
pszText
;
if
(
!
str
)
str
=
""
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
if
(
len
>
0
)
{
citW
.
pszText
=
(
LPWSTR
)
COMCTL32_Alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
citW
.
pszText
,
len
);
}
}
ret
=
COMBOEX_SetItemW
(
hwnd
,
wParam
,(
LPARAM
)
&
citW
);;
if
(
cit
->
mask
&
CBEIF_TEXT
)
COMCTL32_Free
(
citW
.
pszText
);
return
ret
;
}
/* << COMBOEX_SetItemW >> */
/* << COMBOEX_SetUniCodeFormat >> */
...
...
@@ -842,8 +867,10 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
CBEM_SETITEMA
:
return
COMBOEX_SetItemA
(
hwnd
,
wParam
,
lParam
);
/* case CBEM_SETITEMW:
case CBEM_SETUNICODEFORMAT:
case
CBEM_SETITEMW
:
return
COMBOEX_SetItemW
(
hwnd
,
wParam
,
lParam
);
/* case CBEM_SETUNICODEFORMAT:
*/
case
CB_DELETESTRING
:
...
...
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