Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
55ff2549
Commit
55ff2549
authored
Sep 23, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Sep 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Invalid format returned by NF_QUERY defaults to ANSI in treeview.
parent
fcb9c5fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
treeview.c
dlls/comctl32/tests/treeview.c
+12
-1
treeview.c
dlls/comctl32/treeview.c
+4
-5
No files found.
dlls/comctl32/tests/treeview.c
View file @
55ff2549
...
...
@@ -956,6 +956,10 @@ static void test_get_set_unicodeformat(void)
hTree
=
create_treeview_control
(
0
);
fill_tree
(
hTree
);
/* Check that an invalid format returned by NF_QUERY defaults to ANSI */
bPreviousSetting
=
(
BOOL
)
SendMessage
(
hTree
,
TVM_GETUNICODEFORMAT
,
0
,
0
);
ok
(
bPreviousSetting
==
0
,
"Format should be ANSI.
\n
"
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
/* Set to Unicode */
...
...
@@ -1007,10 +1011,17 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam,
}
switch
(
message
)
{
case
WM_NOTIFYFORMAT
:
{
/* Make NF_QUERY return an invalid format to show that it defaults to ANSI */
if
(
lParam
==
NF_QUERY
)
return
0
;
break
;
}
case
WM_NOTIFY
:
{
NMHDR
*
pHdr
=
(
NMHDR
*
)
lParam
;
ok
(
pHdr
->
code
!=
NM_TOOLTIPSCREATED
,
"Treeview should not send NM_TOOLTIPSCREATED
\n
"
);
if
(
pHdr
->
idFrom
==
100
)
{
...
...
dlls/comctl32/treeview.c
View file @
55ff2549
...
...
@@ -848,7 +848,9 @@ static INT TREEVIEW_NotifyFormat (TREEVIEW_INFO *infoPtr, HWND hwndFrom, UINT nC
format
=
SendMessageW
(
hwndFrom
,
WM_NOTIFYFORMAT
,
(
WPARAM
)
infoPtr
->
hwnd
,
NF_QUERY
);
TRACE
(
"format=%d
\n
"
,
format
);
if
(
format
!=
NFR_ANSI
&&
format
!=
NFR_UNICODE
)
return
0
;
/* Invalid format returned by NF_QUERY defaults to ANSI*/
if
(
format
!=
NFR_ANSI
&&
format
!=
NFR_UNICODE
)
format
=
NFR_ANSI
;
infoPtr
->
bNtfUnicode
=
(
format
==
NFR_UNICODE
);
...
...
@@ -5067,10 +5069,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
infoPtr
->
hwndNotify
=
lpcs
->
hwndParent
;
infoPtr
->
hwndToolTip
=
0
;
infoPtr
->
bNtfUnicode
=
IsWindowUnicode
(
hwnd
);
/* Determine what type of notify should be issued */
/* sets infoPtr->bNtfUnicode */
/* Determine what type of notify should be issued (sets infoPtr->bNtfUnicode) */
TREEVIEW_NotifyFormat
(
infoPtr
,
infoPtr
->
hwndNotify
,
NF_REQUERY
);
if
(
!
(
infoPtr
->
dwStyle
&
TVS_NOTOOLTIPS
))
...
...
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