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
d2e881d5
Commit
d2e881d5
authored
Nov 27, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Nov 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Typesafe parameters from TREEVIEW_NotifyFormat.
- Rewrite TREEVIEW_NotifyFormat. - Fix several invocations of TREEVIEW_SendTreeviewNotify.
parent
6a6eae86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
30 deletions
+23
-30
treeview.c
dlls/comctl32/treeview.c
+23
-30
No files found.
dlls/comctl32/treeview.c
View file @
d2e881d5
...
...
@@ -194,7 +194,7 @@ static LRESULT TREEVIEW_RButtonUp(TREEVIEW_INFO *, LPPOINT);
static
LRESULT
TREEVIEW_EndEditLabelNow
(
TREEVIEW_INFO
*
infoPtr
,
BOOL
bCancel
);
static
VOID
TREEVIEW_UpdateScrollBars
(
TREEVIEW_INFO
*
infoPtr
);
static
LRESULT
TREEVIEW_HScroll
(
TREEVIEW_INFO
*
,
WPARAM
);
static
LRESULT
TREEVIEW_NotifyFormat
(
TREEVIEW_INFO
*
infoPtr
,
WPARAM
wParam
,
LPARAM
lParam
);
static
INT
TREEVIEW_NotifyFormat
(
TREEVIEW_INFO
*
infoPtr
,
HWND
wParam
,
UINT
lParam
);
/* Random Utilities *****************************************************/
...
...
@@ -436,12 +436,8 @@ static INT get_notifycode(TREEVIEW_INFO *infoPtr, INT code)
static
LRESULT
TREEVIEW_SendRealNotify
(
TREEVIEW_INFO
*
infoPtr
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
infoPtr
->
bNtfUnicode
)
return
(
BOOL
)
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
wParam
,
lParam
);
else
return
(
BOOL
)
SendMessageA
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
wParam
,
lParam
);
TRACE
(
"wParam=%d, lParam=%ld
\n
"
,
wParam
,
lParam
);
return
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
wParam
,
lParam
);
}
static
BOOL
...
...
@@ -1455,8 +1451,8 @@ TREEVIEW_RemoveItem(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem)
{
TRACE
(
"%p, (%s)
\n
"
,
wineItem
,
TREEVIEW_ItemName
(
wineItem
));
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TVN_DELETEITEMW
,
TVIF_HANDLE
|
TVIF_PARAM
,
0
,
wineItem
,
0
);
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TVN_DELETEITEMW
,
TVC_UNKNOWN
,
TVIF_HANDLE
|
TVIF_PARAM
,
wineItem
,
0
);
if
(
wineItem
->
firstChild
)
TREEVIEW_RemoveAllChildren
(
infoPtr
,
wineItem
);
...
...
@@ -3935,8 +3931,7 @@ TREEVIEW_LButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
/*
* Send the notification
*/
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TVN_SINGLEEXPAND
,
TVIF_HANDLE
|
TVIF_PARAM
,
0
,
ht
.
hItem
,
0
);
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TVN_SINGLEEXPAND
,
TVC_UNKNOWN
,
TVIF_HANDLE
|
TVIF_PARAM
,
ht
.
hItem
,
0
);
/*
* Close the previous selection all the way to the root
...
...
@@ -4778,7 +4773,7 @@ TREEVIEW_Create(HWND hwnd)
/* Determine what type of notify should be issued */
/* sets infoPtr->bNtfUnicode */
TREEVIEW_NotifyFormat
(
infoPtr
,
0
,
NF_REQUERY
);
TREEVIEW_NotifyFormat
(
infoPtr
,
infoPtr
->
hwndNotify
,
NF_REQUERY
);
if
(
!
(
infoPtr
->
dwStyle
&
TVS_NOTOOLTIPS
))
infoPtr
->
hwndToolTip
=
COMCTL32_CreateToolTip
(
hwnd
);
...
...
@@ -5032,26 +5027,24 @@ TREEVIEW_Notify(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
return
DefWindowProcA
(
infoPtr
->
hwnd
,
WM_NOTIFY
,
wParam
,
lParam
);
}
static
LRESULT
TREEVIEW_NotifyFormat
(
TREEVIEW_INFO
*
infoPtr
,
WPARAM
wParam
,
LPARAM
lParam
)
static
INT
TREEVIEW_NotifyFormat
(
TREEVIEW_INFO
*
infoPtr
,
HWND
hwndFrom
,
UINT
nCommand
)
{
INT
i
;
if
(
lParam
==
NF_REQUERY
)
{
i
=
SendMessageA
(
GetParent
(
infoPtr
->
hwnd
),
WM_NOTIFYFORMAT
,
(
WPARAM
)
infoPtr
->
hwnd
,
NF_QUERY
);
if
((
i
<
NFR_ANSI
)
||
(
i
>
NFR_UNICODE
))
{
ERR
(
"wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI
\n
"
,
i
);
i
=
NFR_ANSI
;
}
infoPtr
->
bNtfUnicode
=
(
i
==
NFR_UNICODE
)
?
1
:
0
;
return
(
LRESULT
)
i
;
}
return
(
LRESULT
)((
infoPtr
->
bNtfUnicode
)
?
NFR_UNICODE
:
NFR_ANSI
);
}
INT
format
;
TRACE
(
"(hwndFrom=%p, nCommand=%d)
\n
"
,
hwndFrom
,
nCommand
);
if
(
nCommand
!=
NF_REQUERY
)
return
0
;
format
=
SendMessageW
(
hwndFrom
,
WM_NOTIFYFORMAT
,
(
WPARAM
)
infoPtr
->
hwnd
,
NF_QUERY
);
TRACE
(
"format=%d
\n
"
,
format
);
if
(
format
!=
NFR_ANSI
&&
format
!=
NFR_UNICODE
)
return
0
;
infoPtr
->
bNtfUnicode
=
(
format
==
NFR_UNICODE
);
return
format
;
}
static
LRESULT
TREEVIEW_Size
(
TREEVIEW_INFO
*
infoPtr
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
@@ -5336,7 +5329,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
TREEVIEW_Notify
(
infoPtr
,
wParam
,
lParam
);
case
WM_NOTIFYFORMAT
:
return
TREEVIEW_NotifyFormat
(
infoPtr
,
wParam
,
lParam
);
return
TREEVIEW_NotifyFormat
(
infoPtr
,
(
HWND
)
wParam
,
(
UINT
)
lParam
);
case
WM_PAINT
:
return
TREEVIEW_Paint
(
infoPtr
,
wParam
);
...
...
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