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
07be70b4
Commit
07be70b4
authored
Nov 21, 1999
by
Alex Priem
Committed by
Alexandre Julliard
Nov 21, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed crash when adding items with TVI_SORT and wineItem->pszText is
set to LPSTR_TEXTCALLBACK. - ditto for TREEVIEW_DeleteItem, TREEVIEW_CreateDragImage.
parent
d73cc4c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
treeview.c
dlls/comctl32/treeview.c
+22
-2
No files found.
dlls/comctl32/treeview.c
View file @
07be70b4
...
...
@@ -1752,10 +1752,22 @@ TREEVIEW_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
else
aChild
=
&
infoPtr
->
items
[(
INT
)
infoPtr
->
TopRootItem
];
/* lookup the text if using LPSTR_TEXTCALLBACKs */
if
(
wineItem
->
pszText
==
LPSTR_TEXTCALLBACKA
)
{
TREEVIEW_SendDispInfoNotify
(
hwnd
,
wineItem
,
TVN_GETDISPINFO
,
TVIF_TEXT
);
}
/* Iterate the parent children to see where we fit in */
while
(
aChild
!=
NULL
)
{
INT
comp
=
strcmp
(
wineItem
->
pszText
,
aChild
->
pszText
);
INT
comp
;
/* lookup the text if using LPSTR_TEXTCALLBACKs */
if
(
aChild
->
pszText
==
LPSTR_TEXTCALLBACKA
)
{
TREEVIEW_SendDispInfoNotify
(
hwnd
,
aChild
,
TVN_GETDISPINFO
,
TVIF_TEXT
);
}
comp
=
strcmp
(
wineItem
->
pszText
,
aChild
->
pszText
);
if
(
comp
<
0
)
/* we are smaller than the current one */
{
TREEVIEW_InsertBefore
(
infoPtr
,
wineItem
,
aChild
,
parentItem
);
...
...
@@ -1941,7 +1953,11 @@ TREEVIEW_DeleteItem (HWND hwnd, WPARAM wParam, LPARAM lParam)
iItem
=
(
INT
)
lParam
;
wineItem
=
TREEVIEW_ValidItem
(
infoPtr
,
(
HTREEITEM
)
iItem
);
if
(
!
wineItem
)
return
FALSE
;
TRACE
(
"%s
\n
"
,
wineItem
->
pszText
);
if
(
wineItem
->
pszText
==
LPSTR_TEXTCALLBACKA
)
TRACE
(
"LPSTR_TEXTCALLBACK
\n
"
);
else
TRACE
(
"%s
\n
"
,
wineItem
->
pszText
);
TREEVIEW_RemoveItem
(
hwnd
,
wineItem
);
}
...
...
@@ -3041,6 +3057,10 @@ TREEVIEW_CreateDragImage (HWND hwnd, WPARAM wParam, LPARAM lParam)
dragItem
=
TREEVIEW_ValidItem
(
infoPtr
,
(
HTREEITEM
)
lParam
);
if
(
!
dragItem
)
return
0
;
if
(
dragItem
->
pszText
==
LPSTR_TEXTCALLBACKA
)
{
TREEVIEW_SendDispInfoNotify
(
hwnd
,
dragItem
,
TVN_GETDISPINFO
,
TVIF_TEXT
);
}
itemtxt
=
dragItem
->
pszText
;
hwtop
=
GetDesktopWindow
();
...
...
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