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
5507a073
Commit
5507a073
authored
Jul 10, 2007
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Jul 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: toolbar: We should send TBN_GETDISPINFOW even for ANSI controls (with testcase).
parent
e66523e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
toolbar.c
dlls/comctl32/tests/toolbar.c
+20
-1
toolbar.c
dlls/comctl32/toolbar.c
+3
-3
No files found.
dlls/comctl32/tests/toolbar.c
View file @
5507a073
...
...
@@ -74,6 +74,9 @@ static LRESULT MyWnd_Notify(LPARAM lParam)
break
;
case
TBN_GETDISPINFOA
:
ok
(
FALSE
,
"TBN_GETDISPINFOA received
\n
"
);
break
;
case
TBN_GETDISPINFOW
:
nmdisp
=
(
NMTBDISPINFOA
*
)
lParam
;
...
...
@@ -992,14 +995,30 @@ static void test_dispinfo(void)
{
-
1
,
20
,
TBSTATE_ENABLED
,
0
,
{
0
,
},
0
,
-
1
},
{
0
,
21
,
TBSTATE_ENABLED
,
0
,
{
0
,
},
0
,
-
1
},
};
BOOL
ret
;
rebuild_toolbar
(
&
hToolbar
);
SendMessageA
(
hToolbar
,
TB_LOADIMAGES
,
IDB_HIST_SMALL_COLOR
,
(
LPARAM
)
HINST_COMMCTRL
);
SendMessageA
(
hToolbar
,
TB_ADDBUTTONS
,
2
,
(
LPARAM
)
buttons_disp
);
g_dwExpectedDispInfoMask
=
1
;
/* some TBN_GETDISPINFO tests will be done in MyWnd_Notify function */
/* Some TBN_GETDISPINFO tests will be done in MyWnd_Notify function.
* We will receive TBN_GETDISPINFOW even if the control is ANSI */
compare
((
BOOL
)
SendMessageA
(
hToolbar
,
CCM_GETUNICODEFORMAT
,
0
,
0
),
0
,
"%d"
);
ShowWindow
(
hToolbar
,
SW_SHOW
);
UpdateWindow
(
hToolbar
);
ret
=
(
BOOL
)
SendMessageA
(
hToolbar
,
CCM_SETUNICODEFORMAT
,
TRUE
,
0
);
compare
(
ret
,
FALSE
,
"%d"
);
compare
(
SendMessageA
(
hToolbar
,
CCM_GETUNICODEFORMAT
,
0
,
0
),
1L
,
"%ld"
);
InvalidateRect
(
hToolbar
,
NULL
,
FALSE
);
UpdateWindow
(
hToolbar
);
ret
=
(
BOOL
)
SendMessageA
(
hToolbar
,
CCM_SETUNICODEFORMAT
,
FALSE
,
0
);
compare
(
ret
,
TRUE
,
"%d"
);
compare
(
SendMessageA
(
hToolbar
,
CCM_GETUNICODEFORMAT
,
0
,
0
),
0L
,
"%ld"
);
InvalidateRect
(
hToolbar
,
NULL
,
FALSE
);
UpdateWindow
(
hToolbar
);
DestroyWindow
(
hToolbar
);
g_dwExpectedDispInfoMask
=
0
;
}
...
...
dlls/comctl32/toolbar.c
View file @
5507a073
...
...
@@ -360,15 +360,15 @@ TOOLBAR_GetBitmapIndex(const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr)
if
(
ret
==
I_IMAGECALLBACK
)
{
/* issue TBN_GETDISPINFO */
NMTBDISPINFO
A
nmgd
;
NMTBDISPINFO
W
nmgd
;
memset
(
&
nmgd
,
0
,
sizeof
(
nmgd
));
nmgd
.
idCommand
=
btnPtr
->
idCommand
;
nmgd
.
lParam
=
btnPtr
->
dwData
;
nmgd
.
dwMask
=
TBNF_IMAGE
;
nmgd
.
iImage
=
-
1
;
TOOLBAR_SendNotify
(
&
nmgd
.
hdr
,
infoPtr
,
infoPtr
->
bUnicode
?
TBN_GETDISPINFOW
:
TBN_GETDISPINFOA
);
/* Windows also send TBN_GETDISPINFOW even if the control is ANSI */
TOOLBAR_SendNotify
(
&
nmgd
.
hdr
,
infoPtr
,
TBN_GETDISPINFOW
);
if
(
nmgd
.
dwMask
&
TBNF_DI_SETITEM
)
btnPtr
->
iBitmap
=
nmgd
.
iImage
;
ret
=
nmgd
.
iImage
;
...
...
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