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
a16223e3
Commit
a16223e3
authored
Oct 18, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Oct 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- TBN_DELETINGBUTTON sends the command ID, not the index.
- Fill in tbButton structure for TBN_DELETINGBUTTON notification. - Document TBN_QUERY* sending indices.
parent
d71bc33c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
toolbar.c
dlls/comctl32/toolbar.c
+20
-9
No files found.
dlls/comctl32/toolbar.c
View file @
a16223e3
...
...
@@ -1801,8 +1801,9 @@ static void TOOLBAR_Cust_MoveButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nInde
if
(
nIndexFrom
==
nIndexTo
)
return
;
/* send TBN_QUERYINSERT notification */
nmtb
.
iItem
=
nIndexFrom
;
/* FIXME: this doesn't look right */
/* MSDN states that iItem is the index of the button, rather than the
* command ID as used by every other NMTOOLBAR notification */
nmtb
.
iItem
=
nIndexFrom
;
if
(
TOOLBAR_SendNotify
((
NMHDR
*
)
&
nmtb
,
custInfo
->
tbInfo
,
TBN_QUERYINSERT
))
{
PCUSTOMBUTTON
btnInfo
;
...
...
@@ -1841,8 +1842,9 @@ static void TOOLBAR_Cust_AddButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nIndex
TRACE
(
"Add: nIndexAvail %d, nIndexTo %d
\n
"
,
nIndexAvail
,
nIndexTo
);
/* send TBN_QUERYINSERT notification */
nmtb
.
iItem
=
nIndexAvail
;
/* FIXME: this doesn't look right */
/* MSDN states that iItem is the index of the button, rather than the
* command ID as used by every other NMTOOLBAR notification */
nmtb
.
iItem
=
nIndexAvail
;
if
(
TOOLBAR_SendNotify
((
NMHDR
*
)
&
nmtb
,
custInfo
->
tbInfo
,
TBN_QUERYINSERT
))
{
PCUSTOMBUTTON
btnInfo
;
...
...
@@ -3191,16 +3193,23 @@ TOOLBAR_DeleteButton (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
INT
nIndex
=
(
INT
)
wParam
;
NMTOOLBARW
nmtb
;
TBUTTON_INFO
*
btnPtr
=
&
infoPtr
->
buttons
[
nIndex
];
if
((
nIndex
<
0
)
||
(
nIndex
>=
infoPtr
->
nNumButtons
))
return
FALSE
;
return
FALSE
;
memset
(
&
nmtb
,
0
,
sizeof
(
nmtb
));
nmtb
.
iItem
=
nIndex
;
nmtb
.
iItem
=
btnPtr
->
idCommand
;
nmtb
.
tbButton
.
iBitmap
=
btnPtr
->
iBitmap
;
nmtb
.
tbButton
.
idCommand
=
btnPtr
->
idCommand
;
nmtb
.
tbButton
.
fsState
=
btnPtr
->
fsState
;
nmtb
.
tbButton
.
fsStyle
=
btnPtr
->
fsStyle
;
nmtb
.
tbButton
.
dwData
=
btnPtr
->
dwData
;
nmtb
.
tbButton
.
iString
=
btnPtr
->
iString
;
TOOLBAR_SendNotify
((
NMHDR
*
)
&
nmtb
,
infoPtr
,
TBN_DELETINGBUTTON
);
if
((
infoPtr
->
hwndToolTip
)
&&
!
(
infoPtr
->
buttons
[
nIndex
].
fsStyle
&
BTNS_SEP
))
{
!
(
btnPtr
->
fsStyle
&
BTNS_SEP
))
{
TTTOOLINFOW
ti
;
ZeroMemory
(
&
ti
,
sizeof
(
ti
));
...
...
@@ -7167,10 +7176,12 @@ static BOOL TOOLBAR_GetButtonInfo(TOOLBAR_INFO *infoPtr, NMTOOLBARW *nmtb)
static
BOOL
TOOLBAR_IsButtonRemovable
(
TOOLBAR_INFO
*
infoPtr
,
int
iItem
,
PCUSTOMBUTTON
btnInfo
)
{
NMTOOLBAR
A
nmtb
;
NMTOOLBAR
W
nmtb
;
/* MSDN states that iItem is the index of the button, rather than the
* command ID as used by every other NMTOOLBAR notification */
nmtb
.
iItem
=
iItem
;
memcpy
(
&
nmtb
.
tbButton
,
&
btnInfo
->
btn
,
sizeof
(
TBBUTTON
));
return
TOOLBAR_SendNotify
((
NMHDR
*
)
&
nmtb
,
infoPtr
,
TBN_QUERYDELETE
);
return
TOOLBAR_SendNotify
(
&
nmtb
.
hdr
,
infoPtr
,
TBN_QUERYDELETE
);
}
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