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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
toolbar.c
dlls/comctl32/toolbar.c
+20
-2
No files found.
dlls/comctl32/toolbar.c
View file @
a1edb920
...
...
@@ -2473,6 +2473,9 @@ TOOLBAR_AddButtonsA (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr
->
fsState
=
lpTbb
[
nCount
].
fsState
;
btnPtr
->
fsStyle
=
lpTbb
[
nCount
].
fsStyle
;
btnPtr
->
dwData
=
lpTbb
[
nCount
].
dwData
;
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
;
...
...
@@ -2537,6 +2540,9 @@ TOOLBAR_AddButtonsW (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr
->
fsState
=
lpTbb
[
nCount
].
fsState
;
btnPtr
->
fsStyle
=
lpTbb
[
nCount
].
fsStyle
;
btnPtr
->
dwData
=
lpTbb
[
nCount
].
dwData
;
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
;
...
...
@@ -3148,8 +3154,14 @@ TOOLBAR_GetButtonInfoA (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
);
/* 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
);
/* 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