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
65b637be
Commit
65b637be
authored
Dec 10, 1998
by
Alex Priem
Committed by
Alexandre Julliard
Dec 10, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* handle TVIF_TEXT by TREEVIEW_SetItem according to MS documentation.
* better handling of LPSTR_TEXTCALLBACK32A * TREEVIEW_GetNext|PrevListItem didn't descend into visible child items.
parent
658e35be
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
treeview.c
dlls/comctl32/treeview.c
+25
-8
No files found.
dlls/comctl32/treeview.c
View file @
65b637be
...
...
@@ -81,8 +81,15 @@ static TREEVIEW_ITEM *TREEVIEW_GetPrevListItem (TREEVIEW_INFO *infoPtr,
{
TREEVIEW_ITEM
*
wineItem
;
if
(
tvItem
->
upsibling
)
return
(
&
infoPtr
->
items
[
tvItem
->
upsibling
]);
if
(
tvItem
->
upsibling
)
{
wineItem
=&
infoPtr
->
items
[
tvItem
->
upsibling
];
if
((
wineItem
->
firstChild
)
&&
(
wineItem
->
state
&
TVIS_EXPANDED
))
{
wineItem
=&
infoPtr
->
items
[
wineItem
->
firstChild
];
while
(
wineItem
->
sibling
)
wineItem
=
&
infoPtr
->
items
[
wineItem
->
sibling
];
}
return
wineItem
;
}
wineItem
=
tvItem
;
while
(
wineItem
->
parent
)
{
...
...
@@ -94,12 +101,16 @@ static TREEVIEW_ITEM *TREEVIEW_GetPrevListItem (TREEVIEW_INFO *infoPtr,
return
NULL
;
}
static
TREEVIEW_ITEM
*
TREEVIEW_GetNextListItem
(
TREEVIEW_INFO
*
infoPtr
,
TREEVIEW_ITEM
*
tvItem
)
{
TREEVIEW_ITEM
*
wineItem
;
if
((
tvItem
->
firstChild
)
&&
(
tvItem
->
state
&
TVIS_EXPANDED
))
return
(
&
infoPtr
->
items
[
tvItem
->
firstChild
]);
if
(
tvItem
->
sibling
)
return
(
&
infoPtr
->
items
[
tvItem
->
sibling
]);
...
...
@@ -522,7 +533,7 @@ TREEVIEW_SetItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
if
(
tvItem
->
mask
&
TVIF_TEXT
)
{
len
=
tvItem
->
cchTextMax
;
len
=
lstrlen32A
(
tvItem
->
pszText
)
;
if
(
len
>
wineItem
->
cchTextMax
)
{
HeapFree
(
GetProcessHeap
(),
0
,
wineItem
->
pszText
);
wineItem
->
pszText
=
HeapAlloc
(
GetProcessHeap
(),
...
...
@@ -698,7 +709,7 @@ TREEVIEW_GetItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
TREEVIEW_INFO
*
infoPtr
=
TREEVIEW_GetInfoPtr
(
wndPtr
);
LPTVITEM
tvItem
;
TREEVIEW_ITEM
*
wineItem
;
INT32
iItem
,
len
;
INT32
iItem
;
TRACE
(
treeview
,
"
\n
"
);
tvItem
=
(
LPTVITEM
)
lParam
;
...
...
@@ -737,10 +748,12 @@ TREEVIEW_GetItem (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
}
if
(
tvItem
->
mask
&
TVIF_TEXT
)
{
len
=
wineItem
->
cchTextMax
;
if
(
wineItem
->
cchTextMax
>
tvItem
->
cchTextMax
)
len
=
tvItem
->
cchTextMax
-
1
;
lstrcpyn32A
(
tvItem
->
pszText
,
tvItem
->
pszText
,
len
);
if
(
wineItem
->
pszText
==
LPSTR_TEXTCALLBACK32A
)
{
tvItem
->
pszText
=
LPSTR_TEXTCALLBACK32A
;
}
else
if
(
wineItem
->
pszText
)
{
lstrcpyn32A
(
tvItem
->
pszText
,
wineItem
->
pszText
,
tvItem
->
cchTextMax
);
}
}
return
TRUE
;
...
...
@@ -974,6 +987,10 @@ TREEVIEW_InsertItem32A (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
lstrcpy32A
(
wineItem
->
pszText
,
tvItem
->
pszText
);
wineItem
->
cchTextMax
=
len
;
}
else
{
wineItem
->
pszText
=
LPSTR_TEXTCALLBACK32A
;
wineItem
->
cchTextMax
=
0
;
}
}
TREEVIEW_QueueRefresh
(
wndPtr
);
...
...
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