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
a1edb920
Commit
a1edb920
authored
Feb 09, 2004
by
Huw Davies
Committed by
Alexandre Julliard
Feb 09, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TB_ADDBUTTONS can pass a string ptr instead of an index.
TB_GETBUTTONINFO only returns a string if it's not in the internal string list.
parent
e0e31478
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
toolbar.c
dlls/comctl32/toolbar.c
+26
-8
No files found.
dlls/comctl32/toolbar.c
View file @
a1edb920
...
...
@@ -2473,7 +2473,10 @@ TOOLBAR_AddButtonsA (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr
->
fsState
=
lpTbb
[
nCount
].
fsState
;
btnPtr
->
fsStyle
=
lpTbb
[
nCount
].
fsStyle
;
btnPtr
->
dwData
=
lpTbb
[
nCount
].
dwData
;
btnPtr
->
iString
=
lpTbb
[
nCount
].
iString
;
if
(
HIWORD
(
lpTbb
[
nCount
].
iString
)
&&
lpTbb
[
nCount
].
iString
!=
-
1
)
Str_SetPtrAtoW
((
LPWSTR
*
)
&
btnPtr
->
iString
,
(
LPSTR
)
lpTbb
[
nCount
].
iString
);
else
btnPtr
->
iString
=
lpTbb
[
nCount
].
iString
;
btnPtr
->
bHot
=
FALSE
;
if
((
infoPtr
->
hwndToolTip
)
&&
!
(
btnPtr
->
fsStyle
&
BTNS_SEP
))
{
...
...
@@ -2537,7 +2540,10 @@ TOOLBAR_AddButtonsW (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr
->
fsState
=
lpTbb
[
nCount
].
fsState
;
btnPtr
->
fsStyle
=
lpTbb
[
nCount
].
fsStyle
;
btnPtr
->
dwData
=
lpTbb
[
nCount
].
dwData
;
btnPtr
->
iString
=
lpTbb
[
nCount
].
iString
;
if
(
HIWORD
(
lpTbb
[
nCount
].
iString
)
&&
lpTbb
[
nCount
].
iString
!=
-
1
)
Str_SetPtrW
((
LPWSTR
*
)
&
btnPtr
->
iString
,
(
LPWSTR
)
lpTbb
[
nCount
].
iString
);
else
btnPtr
->
iString
=
lpTbb
[
nCount
].
iString
;
btnPtr
->
bHot
=
FALSE
;
if
((
infoPtr
->
hwndToolTip
)
&&
!
(
btnPtr
->
fsStyle
&
BTNS_SEP
))
{
...
...
@@ -3147,10 +3153,16 @@ TOOLBAR_GetButtonInfoA (HWND hwnd, WPARAM wParam, LPARAM lParam)
lpTbInfo
->
fsState
=
btnPtr
->
fsState
;
if
(
lpTbInfo
->
dwMask
&
TBIF_STYLE
)
lpTbInfo
->
fsStyle
=
btnPtr
->
fsStyle
;
if
(
lpTbInfo
->
dwMask
&
TBIF_TEXT
)
{
LPWSTR
lpText
=
TOOLBAR_GetText
(
infoPtr
,
btnPtr
);
Str_GetPtrWtoA
(
lpText
,
lpTbInfo
->
pszText
,
lpTbInfo
->
cchText
);
}
if
(
lpTbInfo
->
dwMask
&
TBIF_TEXT
)
{
/* TB_GETBUTTONINFO doesn't retrieve text from the string list, so we
can't use TOOLBAR_GetText here */
LPWSTR
lpText
;
if
(
HIWORD
(
btnPtr
->
iString
)
&&
(
btnPtr
->
iString
!=
-
1
))
{
lpText
=
(
LPWSTR
)
btnPtr
->
iString
;
Str_GetPtrWtoA
(
lpText
,
lpTbInfo
->
pszText
,
lpTbInfo
->
cchText
);
}
else
lpTbInfo
->
pszText
[
0
]
=
'\0'
;
}
return
nIndex
;
}
...
...
@@ -3193,8 +3205,14 @@ TOOLBAR_GetButtonInfoW (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
lpTbInfo
->
dwMask
&
TBIF_STYLE
)
lpTbInfo
->
fsStyle
=
btnPtr
->
fsStyle
;
if
(
lpTbInfo
->
dwMask
&
TBIF_TEXT
)
{
LPWSTR
lpText
=
TOOLBAR_GetText
(
infoPtr
,
btnPtr
);
Str_GetPtrW
(
lpText
,
lpTbInfo
->
pszText
,
lpTbInfo
->
cchText
);
/* TB_GETBUTTONINFO doesn't retrieve text from the string list, so we
can't use TOOLBAR_GetText here */
LPWSTR
lpText
;
if
(
HIWORD
(
btnPtr
->
iString
)
&&
(
btnPtr
->
iString
!=
-
1
))
{
lpText
=
(
LPWSTR
)
btnPtr
->
iString
;
Str_GetPtrW
(
lpText
,
lpTbInfo
->
pszText
,
lpTbInfo
->
cchText
);
}
else
lpTbInfo
->
pszText
[
0
]
=
'\0'
;
}
return
nIndex
;
...
...
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