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
1fbea59f
Commit
1fbea59f
authored
Apr 26, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Apr 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The ansi version of CB_ADDSTRING shouldn't overwrite the string if
converting case.
parent
32498176
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
combo.c
dlls/user/combo.c
+27
-4
No files found.
dlls/user/combo.c
View file @
1fbea59f
...
...
@@ -1828,6 +1828,18 @@ static void COMBO_MouseMove( LPHEADCOMBO lphc, WPARAM wParam, LPARAM lParam )
}
}
static
char
*
strdupA
(
LPCSTR
str
)
{
char
*
ret
;
DWORD
len
;
if
(
!
str
)
return
NULL
;
len
=
strlen
(
str
);
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
+
1
);
memcpy
(
ret
,
str
,
len
+
1
);
return
ret
;
}
/***********************************************************************
* ComboWndProc_common
...
...
@@ -2054,13 +2066,24 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message,
struprW
((
LPWSTR
)
lParam
);
return
SendMessageW
(
lphc
->
hWndLBox
,
LB_ADDSTRING
,
0
,
lParam
);
}
else
else
/* unlike the unicode version, the ansi version does not overwrite
the string if converting case */
{
char
*
string
=
NULL
;
LRESULT
ret
;
if
(
lphc
->
dwStyle
&
CBS_LOWERCASE
)
_strlwr
((
LPSTR
)
lParam
);
{
string
=
strdupA
((
LPSTR
)
lParam
);
_strlwr
(
string
);
}
else
if
(
lphc
->
dwStyle
&
CBS_UPPERCASE
)
_strupr
((
LPSTR
)
lParam
);
return
SendMessageA
(
lphc
->
hWndLBox
,
LB_ADDSTRING
,
0
,
lParam
);
{
string
=
strdupA
((
LPSTR
)
lParam
);
_strupr
(
string
);
}
ret
=
SendMessageA
(
lphc
->
hWndLBox
,
LB_ADDSTRING
,
0
,
string
?
(
LPARAM
)
string
:
lParam
);
HeapFree
(
GetProcessHeap
(),
0
,
string
);
return
ret
;
}
case
CB_INSERTSTRING16
:
wParam
=
(
INT
)(
INT16
)
wParam
;
...
...
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