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
4b4e9781
Commit
4b4e9781
authored
Jun 25, 2000
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 25, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add workarounds for null strings in TOOLBAR_InsertButtonA and calling
TOOLBAR_SetButtonSize after button added to the toolbar (latter for WINZIP32.EXE)
parent
d2922348
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
9 deletions
+26
-9
toolbar.c
dlls/comctl32/toolbar.c
+26
-9
No files found.
dlls/comctl32/toolbar.c
View file @
4b4e9781
...
...
@@ -2272,14 +2272,22 @@ TOOLBAR_InsertButtonA (HWND hwnd, WPARAM wParam, LPARAM lParam)
* I only see this happen with nIndex == -1, but it could have a special
* meaning (like -nIndex (or ~nIndex) to get the real position of insertion).
*/
int
len
=
lstrlenA
((
char
*
)
lpTbb
->
iString
)
+
2
;
LPSTR
ptr
=
COMCTL32_Alloc
(
len
);
nIndex
=
infoPtr
->
nNumButtons
;
strcpy
(
ptr
,
(
char
*
)
lpTbb
->
iString
);
ptr
[
len
-
1
]
=
0
;
/* ended by two '\0' */
lpTbb
->
iString
=
TOOLBAR_AddStringA
(
hwnd
,
0
,
(
LPARAM
)
ptr
);
COMCTL32_Free
(
ptr
);
int
len
;
LPSTR
ptr
;
if
(
lpTbb
->
iString
)
{
len
=
lstrlenA
((
char
*
)
lpTbb
->
iString
)
+
2
;
ptr
=
COMCTL32_Alloc
(
len
);
nIndex
=
infoPtr
->
nNumButtons
;
strcpy
(
ptr
,
(
char
*
)
lpTbb
->
iString
);
ptr
[
len
-
1
]
=
0
;
/* ended by two '\0' */
lpTbb
->
iString
=
TOOLBAR_AddStringA
(
hwnd
,
0
,
(
LPARAM
)
ptr
);
COMCTL32_Free
(
ptr
);
}
else
{
ERR
(
"lpTbb->iString is NULL
\n
"
);
return
FALSE
;
}
}
else
if
(
nIndex
<
0
)
return
FALSE
;
...
...
@@ -2721,12 +2729,21 @@ TOOLBAR_SetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
if
((
LOWORD
(
lParam
)
<=
0
)
||
(
HIWORD
(
lParam
)
<=
0
))
{
ERR
(
"invalid parameter
\n
"
);
return
FALSE
;
}
/* Button size can only be set before adding any button to the toolbar
according to the documentation. */
/* this appears to be wrong. WINZIP32.EXE (ver 8) calls this on
one of its buttons after adding it to the toolbar, and it
checks that the return value is nonzero - mjm */
if
(
infoPtr
->
nNumButtons
!=
0
)
return
FALSE
;
{
FIXME
(
"Button size set after button in toolbar
\n
"
);
return
TRUE
;
}
infoPtr
->
nButtonWidth
=
(
INT
)
LOWORD
(
lParam
);
infoPtr
->
nButtonHeight
=
(
INT
)
HIWORD
(
lParam
);
...
...
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