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
4bbd7b3e
Commit
4bbd7b3e
authored
Oct 31, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Oct 31, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some treeview notification codes between ANSI/Unicode mode.
parent
7efe3ff0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
treeview.c
dlls/comctl32/treeview.c
+25
-25
No files found.
dlls/comctl32/treeview.c
View file @
4bbd7b3e
...
@@ -414,10 +414,21 @@ TREEVIEW_GetListItem(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
...
@@ -414,10 +414,21 @@ TREEVIEW_GetListItem(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
static
INT
get_notifycode
(
TREEVIEW_INFO
*
infoPtr
,
INT
code
)
static
INT
get_notifycode
(
TREEVIEW_INFO
*
infoPtr
,
INT
code
)
{
{
if
(
infoPtr
->
bNtfUnicode
)
{
if
(
!
infoPtr
->
bNtfUnicode
)
{
if
(
code
>=
(
TVN_FIRST
+
TVN_LAST
)
/
2
)
code
-=
(
TVN_FIRST
-
TVN_LAST
)
/
2
;
switch
(
code
)
{
}
else
{
case
TVN_SELCHANGINGW
:
return
TVN_SELCHANGINGA
;
if
(
code
<
(
TVN_FIRST
+
TVN_LAST
)
/
2
)
code
+=
(
TVN_FIRST
-
TVN_LAST
)
/
2
;
case
TVN_SELCHANGEDW
:
return
TVN_SELCHANGEDA
;
case
TVN_GETDISPINFOW
:
return
TVN_GETDISPINFOA
;
case
TVN_SETDISPINFOW
:
return
TVN_SETDISPINFOA
;
case
TVN_ITEMEXPANDINGW
:
return
TVN_ITEMEXPANDINGA
;
case
TVN_ITEMEXPANDEDW
:
return
TVN_ITEMEXPANDEDA
;
case
TVN_BEGINDRAGW
:
return
TVN_BEGINDRAGA
;
case
TVN_BEGINRDRAGW
:
return
TVN_BEGINRDRAGA
;
case
TVN_DELETEITEMW
:
return
TVN_DELETEITEMA
;
case
TVN_BEGINLABELEDITW
:
return
TVN_BEGINLABELEDITA
;
case
TVN_ENDLABELEDITW
:
return
TVN_ENDLABELEDITA
;
case
TVN_GETINFOTIPW
:
return
TVN_GETINFOTIPA
;
}
}
}
return
code
;
return
code
;
}
}
...
@@ -633,7 +644,7 @@ TREEVIEW_BeginLabelEditNotify(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *editItem)
...
@@ -633,7 +644,7 @@ TREEVIEW_BeginLabelEditNotify(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *editItem)
tvdi
.
hdr
.
hwndFrom
=
hwnd
;
tvdi
.
hdr
.
hwndFrom
=
hwnd
;
tvdi
.
hdr
.
idFrom
=
GetWindowLongA
(
hwnd
,
GWL_ID
);
tvdi
.
hdr
.
idFrom
=
GetWindowLongA
(
hwnd
,
GWL_ID
);
tvdi
.
hdr
.
code
=
get_notifycode
(
infoPtr
,
TVN_BEGINLABELEDIT
A
);
tvdi
.
hdr
.
code
=
get_notifycode
(
infoPtr
,
TVN_BEGINLABELEDIT
W
);
tvdi
.
item
.
mask
=
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
|
TVIF_TEXT
;
tvdi
.
item
.
mask
=
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
|
TVIF_TEXT
;
tvdi
.
item
.
hItem
=
editItem
;
tvdi
.
item
.
hItem
=
editItem
;
...
@@ -677,8 +688,7 @@ TREEVIEW_UpdateDispInfo(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
...
@@ -677,8 +688,7 @@ TREEVIEW_UpdateDispInfo(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
callback
.
hdr
.
hwndFrom
=
hwnd
;
callback
.
hdr
.
hwndFrom
=
hwnd
;
callback
.
hdr
.
idFrom
=
GetWindowLongA
(
hwnd
,
GWL_ID
);
callback
.
hdr
.
idFrom
=
GetWindowLongA
(
hwnd
,
GWL_ID
);
callback
.
hdr
.
code
=
(
infoPtr
->
bNtfUnicode
)
?
TVN_GETDISPINFOW
:
callback
.
hdr
.
code
=
get_notifycode
(
infoPtr
,
TVN_GETDISPINFOW
);
TVN_GETDISPINFOA
;
/* 'state' always contains valid value, as well as 'lParam'.
/* 'state' always contains valid value, as well as 'lParam'.
* All other parameters are uninitialized.
* All other parameters are uninitialized.
...
@@ -1445,9 +1455,7 @@ TREEVIEW_RemoveItem(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem)
...
@@ -1445,9 +1455,7 @@ TREEVIEW_RemoveItem(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem)
{
{
TRACE
(
"%p, (%s)
\n
"
,
wineItem
,
TREEVIEW_ItemName
(
wineItem
));
TRACE
(
"%p, (%s)
\n
"
,
wineItem
,
TREEVIEW_ItemName
(
wineItem
));
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TVN_DELETEITEMW
,
(
infoPtr
->
bNtfUnicode
)
?
TVN_DELETEITEMW
:
TVN_DELETEITEMA
,
TVIF_HANDLE
|
TVIF_PARAM
,
0
,
wineItem
,
0
);
TVIF_HANDLE
|
TVIF_PARAM
,
0
,
wineItem
,
0
);
if
(
wineItem
->
firstChild
)
if
(
wineItem
->
firstChild
)
...
@@ -3059,10 +3067,7 @@ static BOOL
...
@@ -3059,10 +3067,7 @@ static BOOL
TREEVIEW_SendExpanding
(
TREEVIEW_INFO
*
infoPtr
,
TREEVIEW_ITEM
*
wineItem
,
TREEVIEW_SendExpanding
(
TREEVIEW_INFO
*
infoPtr
,
TREEVIEW_ITEM
*
wineItem
,
UINT
action
)
UINT
action
)
{
{
return
!
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
return
!
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TVN_ITEMEXPANDINGW
,
action
,
(
infoPtr
->
bNtfUnicode
)
?
TVN_ITEMEXPANDINGW
:
TVN_ITEMEXPANDINGA
,
action
,
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
|
TVIF_IMAGE
|
TVIF_SELECTEDIMAGE
,
|
TVIF_IMAGE
|
TVIF_SELECTEDIMAGE
,
0
,
wineItem
);
0
,
wineItem
);
...
@@ -3072,10 +3077,7 @@ static VOID
...
@@ -3072,10 +3077,7 @@ static VOID
TREEVIEW_SendExpanded
(
TREEVIEW_INFO
*
infoPtr
,
TREEVIEW_ITEM
*
wineItem
,
TREEVIEW_SendExpanded
(
TREEVIEW_INFO
*
infoPtr
,
TREEVIEW_ITEM
*
wineItem
,
UINT
action
)
UINT
action
)
{
{
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TVN_ITEMEXPANDEDW
,
action
,
(
infoPtr
->
bNtfUnicode
)
?
TVN_ITEMEXPANDEDW
:
TVN_ITEMEXPANDEDA
,
action
,
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
|
TVIF_IMAGE
|
TVIF_SELECTEDIMAGE
,
|
TVIF_IMAGE
|
TVIF_SELECTEDIMAGE
,
0
,
wineItem
);
0
,
wineItem
);
...
@@ -3638,7 +3640,7 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
...
@@ -3638,7 +3640,7 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
tvdi
.
hdr
.
hwndFrom
=
hwnd
;
tvdi
.
hdr
.
hwndFrom
=
hwnd
;
tvdi
.
hdr
.
idFrom
=
GetWindowLongA
(
hwnd
,
GWL_ID
);
tvdi
.
hdr
.
idFrom
=
GetWindowLongA
(
hwnd
,
GWL_ID
);
tvdi
.
hdr
.
code
=
get_notifycode
(
infoPtr
,
TVN_ENDLABELEDIT
A
);
tvdi
.
hdr
.
code
=
get_notifycode
(
infoPtr
,
TVN_ENDLABELEDIT
W
);
tvdi
.
item
.
mask
=
0
;
tvdi
.
item
.
mask
=
0
;
tvdi
.
item
.
hItem
=
editedItem
;
tvdi
.
item
.
hItem
=
editedItem
;
tvdi
.
item
.
state
=
editedItem
->
state
;
tvdi
.
item
.
state
=
editedItem
->
state
;
...
@@ -3884,8 +3886,7 @@ TREEVIEW_LButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
...
@@ -3884,8 +3886,7 @@ TREEVIEW_LButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
{
/* if TREEVIEW_TrackMouse == 1 dragging occurred and the cursor left the dragged item's rectangle */
{
/* if TREEVIEW_TrackMouse == 1 dragging occurred and the cursor left the dragged item's rectangle */
if
(
TREEVIEW_TrackMouse
(
infoPtr
,
ht
.
pt
))
if
(
TREEVIEW_TrackMouse
(
infoPtr
,
ht
.
pt
))
{
{
TREEVIEW_SendTreeviewDnDNotify
(
infoPtr
,
TVN_BEGINDRAGA
,
ht
.
hItem
,
TREEVIEW_SendTreeviewDnDNotify
(
infoPtr
,
TVN_BEGINDRAGW
,
ht
.
hItem
,
ht
.
pt
);
ht
.
pt
);
infoPtr
->
dropItem
=
ht
.
hItem
;
infoPtr
->
dropItem
=
ht
.
hItem
;
/* clean up focusedItem as we dragged and won't select this item */
/* clean up focusedItem as we dragged and won't select this item */
...
@@ -4009,8 +4010,7 @@ TREEVIEW_RButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
...
@@ -4009,8 +4010,7 @@ TREEVIEW_RButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
{
{
if
(
ht
.
hItem
)
if
(
ht
.
hItem
)
{
{
TREEVIEW_SendTreeviewDnDNotify
(
infoPtr
,
TVN_BEGINRDRAGA
,
ht
.
hItem
,
TREEVIEW_SendTreeviewDnDNotify
(
infoPtr
,
TVN_BEGINRDRAGW
,
ht
.
hItem
,
ht
.
pt
);
ht
.
pt
);
infoPtr
->
dropItem
=
ht
.
hItem
;
infoPtr
->
dropItem
=
ht
.
hItem
;
}
}
}
}
...
@@ -4128,7 +4128,7 @@ TREEVIEW_DoSelectItem(TREEVIEW_INFO *infoPtr, INT action, HTREEITEM newSelect,
...
@@ -4128,7 +4128,7 @@ TREEVIEW_DoSelectItem(TREEVIEW_INFO *infoPtr, INT action, HTREEITEM newSelect,
return
FALSE
;
return
FALSE
;
if
(
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
if
(
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TVN_SELCHANGING
A
,
TVN_SELCHANGING
W
,
cause
,
cause
,
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
,
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
,
prevSelect
,
prevSelect
,
...
@@ -4145,7 +4145,7 @@ TREEVIEW_DoSelectItem(TREEVIEW_INFO *infoPtr, INT action, HTREEITEM newSelect,
...
@@ -4145,7 +4145,7 @@ TREEVIEW_DoSelectItem(TREEVIEW_INFO *infoPtr, INT action, HTREEITEM newSelect,
TREEVIEW_EnsureVisible
(
infoPtr
,
infoPtr
->
selectedItem
,
FALSE
);
TREEVIEW_EnsureVisible
(
infoPtr
,
infoPtr
->
selectedItem
,
FALSE
);
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TREEVIEW_SendTreeviewNotify
(
infoPtr
,
TVN_SELCHANGED
A
,
TVN_SELCHANGED
W
,
cause
,
cause
,
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
,
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
,
prevSelect
,
prevSelect
,
...
...
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