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
b2f0a6f5
Commit
b2f0a6f5
authored
Feb 27, 2002
by
Guy L. Albertelli
Committed by
Alexandre Julliard
Feb 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Support CCS_VERT as alternative for TBSTYLE_WRAPABLE.
- TB_INSERTBUTTONW was not as functional as the 'A' version. They now match.
parent
1056953e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
17 deletions
+31
-17
toolbar.c
dlls/comctl32/toolbar.c
+31
-17
No files found.
dlls/comctl32/toolbar.c
View file @
b2f0a6f5
...
@@ -892,6 +892,9 @@ TOOLBAR_CalcStrings (HWND hwnd, LPSIZE lpSize)
...
@@ -892,6 +892,9 @@ TOOLBAR_CalcStrings (HWND hwnd, LPSIZE lpSize)
* takes place in TOOLBAR_CalcToolbar. If the program wants to manage
* takes place in TOOLBAR_CalcToolbar. If the program wants to manage
* the toolbar wrapping on its own, it can use the TBSTYLE_WRAPABLE
* the toolbar wrapping on its own, it can use the TBSTYLE_WRAPABLE
* flag, and set the TBSTATE_WRAP flags manually on the appropriate items.
* flag, and set the TBSTATE_WRAP flags manually on the appropriate items.
*
* Note: TBSTYLE_WRAPABLE or CCS_VERT can be used also to allow vertical
* toolbar lists.
*/
*/
static
void
static
void
...
@@ -906,7 +909,7 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle )
...
@@ -906,7 +909,7 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle )
/* When the toolbar window style is not TBSTYLE_WRAPABLE, */
/* When the toolbar window style is not TBSTYLE_WRAPABLE, */
/* no layout is necessary. Applications may use this style */
/* no layout is necessary. Applications may use this style */
/* to perform their own layout on the toolbar. */
/* to perform their own layout on the toolbar. */
if
(
!
(
dwStyle
&
TBSTYLE_WRAPABLE
)
)
if
(
!
(
dwStyle
&
TBSTYLE_WRAPABLE
)
&&
!
(
dwStyle
&
CCS_VERT
)
)
return
;
return
;
btnPtr
=
infoPtr
->
buttons
;
btnPtr
=
infoPtr
->
buttons
;
...
@@ -3217,24 +3220,18 @@ TOOLBAR_InsertButtonW (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -3217,24 +3220,18 @@ TOOLBAR_InsertButtonW (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_DumpButton
(
infoPtr
,
(
TBUTTON_INFO
*
)
lpTbb
,
nIndex
,
FALSE
);
TOOLBAR_DumpButton
(
infoPtr
,
(
TBUTTON_INFO
*
)
lpTbb
,
nIndex
,
FALSE
);
if
(
nIndex
<
0
)
if
(
nIndex
==
-
1
)
{
return
FALSE
;
/* EPP: this seems to be an undocumented call (from my IE4)
* I assume in that case that:
TRACE
(
"inserting button index=%d
\n
"
,
nIndex
);
* - lpTbb->iString is a string pointer (not a string index in strings[] table
if
(
nIndex
>
infoPtr
->
nNumButtons
)
{
* - index of insertion is at the end of existing buttons
* 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).
*/
nIndex
=
infoPtr
->
nNumButtons
;
nIndex
=
infoPtr
->
nNumButtons
;
TRACE
(
"adjust index=%d
\n
"
,
nIndex
);
}
oldButtons
=
infoPtr
->
buttons
;
infoPtr
->
nNumButtons
++
;
infoPtr
->
buttons
=
COMCTL32_Alloc
(
sizeof
(
TBUTTON_INFO
)
*
infoPtr
->
nNumButtons
);
/* pre insert copy */
if
(
nIndex
>
0
)
{
memcpy
(
&
infoPtr
->
buttons
[
0
],
&
oldButtons
[
0
],
nIndex
*
sizeof
(
TBUTTON_INFO
));
}
}
else
if
(
nIndex
<
0
)
return
FALSE
;
/* If the string passed is not an index, assume address of string
/* If the string passed is not an index, assume address of string
and do our own AddString */
and do our own AddString */
...
@@ -3252,6 +3249,21 @@ TOOLBAR_InsertButtonW (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -3252,6 +3249,21 @@ TOOLBAR_InsertButtonW (HWND hwnd, WPARAM wParam, LPARAM lParam)
COMCTL32_Free
(
ptr
);
COMCTL32_Free
(
ptr
);
}
}
TRACE
(
"inserting button index=%d
\n
"
,
nIndex
);
if
(
nIndex
>
infoPtr
->
nNumButtons
)
{
nIndex
=
infoPtr
->
nNumButtons
;
TRACE
(
"adjust index=%d
\n
"
,
nIndex
);
}
oldButtons
=
infoPtr
->
buttons
;
infoPtr
->
nNumButtons
++
;
infoPtr
->
buttons
=
COMCTL32_Alloc
(
sizeof
(
TBUTTON_INFO
)
*
infoPtr
->
nNumButtons
);
/* pre insert copy */
if
(
nIndex
>
0
)
{
memcpy
(
&
infoPtr
->
buttons
[
0
],
&
oldButtons
[
0
],
nIndex
*
sizeof
(
TBUTTON_INFO
));
}
/* insert new button */
/* insert new button */
infoPtr
->
buttons
[
nIndex
].
iBitmap
=
lpTbb
->
iBitmap
;
infoPtr
->
buttons
[
nIndex
].
iBitmap
=
lpTbb
->
iBitmap
;
infoPtr
->
buttons
[
nIndex
].
idCommand
=
lpTbb
->
idCommand
;
infoPtr
->
buttons
[
nIndex
].
idCommand
=
lpTbb
->
idCommand
;
...
@@ -3287,6 +3299,8 @@ TOOLBAR_InsertButtonW (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -3287,6 +3299,8 @@ TOOLBAR_InsertButtonW (HWND hwnd, WPARAM wParam, LPARAM lParam)
COMCTL32_Free
(
oldButtons
);
COMCTL32_Free
(
oldButtons
);
TOOLBAR_CalcToolbar
(
hwnd
);
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
return
TRUE
;
return
TRUE
;
...
...
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