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
f07f08cf
Commit
f07f08cf
authored
Nov 01, 2004
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Nov 01, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send notification messages in the format dictated by
infoPtr->notifyFormat.
parent
1d945eaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
29 deletions
+40
-29
listview.c
dlls/comctl32/listview.c
+40
-29
No files found.
dlls/comctl32/listview.c
View file @
f07f08cf
...
...
@@ -818,10 +818,8 @@ static int get_ansi_notification(INT unicodeNotificationCode)
}
/*
With testing on Windows 2000 it looks like the notify format
has nothing to do with this message. It ALWAYS seems to be
in ansi format.
Send notification. depends on dispinfoW having same
structure as dispinfoA.
infoPtr : listview struct
notificationCode : *Unicode* notification code
pdi : dispinfo structure (can be unicode or ansi)
...
...
@@ -830,32 +828,40 @@ static int get_ansi_notification(INT unicodeNotificationCode)
static
BOOL
notify_dispinfoT
(
LISTVIEW_INFO
*
infoPtr
,
INT
notificationCode
,
LPNMLVDISPINFOW
pdi
,
BOOL
isW
)
{
BOOL
bResult
=
FALSE
;
BOOL
convertToAnsi
=
FALSE
;
INT
cchTempBufMax
=
0
,
savCchTextMax
=
0
;
BOOL
convertToAnsi
=
FALSE
,
convertToUnicode
=
FALSE
;
INT
cchTempBufMax
=
0
,
savCchTextMax
=
0
,
realNotifCode
;
LPWSTR
pszTempBuf
=
NULL
,
savPszText
=
NULL
;
if
((
pdi
->
item
.
mask
&
LVIF_TEXT
)
&&
is_textT
(
pdi
->
item
.
pszText
,
isW
))
convertToAnsi
=
isW
;
{
convertToAnsi
=
(
isW
&&
infoPtr
->
notifyFormat
==
NFR_ANSI
);
convertToUnicode
=
(
!
isW
&&
infoPtr
->
notifyFormat
==
NFR_UNICODE
);
}
if
(
convertToAnsi
)
if
(
convertToAnsi
||
convertToUnicode
)
{
if
(
notificationCode
!=
LVN_GETDISPINFOW
)
{
cchTempBufMax
=
WideCharToMultiByte
(
CP_ACP
,
0
,
pdi
->
item
.
pszText
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
}
else
{
cchTempBufMax
=
pdi
->
item
.
cchTextMax
;
*
pdi
->
item
.
pszText
=
0
;
/* make sure we don't process garbage */
{
cchTempBufMax
=
convertToUnicode
?
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
pdi
->
item
.
pszText
,
-
1
,
NULL
,
0
)
:
WideCharToMultiByte
(
CP_ACP
,
0
,
pdi
->
item
.
pszText
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
}
pszTempBuf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
CHAR
)
*
cchTempBufMax
);
else
{
cchTempBufMax
=
pdi
->
item
.
cchTextMax
;
*
pdi
->
item
.
pszText
=
0
;
/* make sure we don't process garbage */
}
pszTempBuf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
convertToUnicode
?
sizeof
(
WCHAR
)
:
sizeof
(
CHAR
))
*
cchTempBufMax
);
if
(
!
pszTempBuf
)
return
FALSE
;
WideCharToMultiByte
(
CP_ACP
,
0
,
pdi
->
item
.
pszText
,
-
1
,
(
LPSTR
)
pszTempBuf
,
cchTempBufMax
,
NULL
,
NULL
);
if
(
convertToUnicode
)
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
pdi
->
item
.
pszText
,
-
1
,
pszTempBuf
,
cchTempBufMax
);
else
WideCharToMultiByte
(
CP_ACP
,
0
,
pdi
->
item
.
pszText
,
-
1
,
(
LPSTR
)
pszTempBuf
,
cchTempBufMax
,
NULL
,
NULL
);
savCchTextMax
=
pdi
->
item
.
cchTextMax
;
savPszText
=
pdi
->
item
.
pszText
;
...
...
@@ -863,16 +869,21 @@ static BOOL notify_dispinfoT(LISTVIEW_INFO *infoPtr, INT notificationCode, LPNML
pdi
->
item
.
cchTextMax
=
cchTempBufMax
;
}
TRACE
(
" pdi->item=%s
\n
"
,
debuglvitem_t
(
&
pdi
->
item
,
infoPtr
->
notifyFormat
!=
NFR_ANSI
));
bResult
=
notify_hdr
(
infoPtr
,
get_ansi_notification
(
notificationCode
),
(
LPNMHDR
)
pdi
);
if
(
infoPtr
->
notifyFormat
==
NFR_ANSI
)
realNotifCode
=
get_ansi_notification
(
notificationCode
);
else
realNotifCode
=
notificationCode
;
TRACE
(
" pdi->item=%s
\n
"
,
debuglvitem_t
(
&
pdi
->
item
,
infoPtr
->
notifyFormat
!=
NFR_ANSI
));
bResult
=
notify_hdr
(
infoPtr
,
realNotifCode
,
&
pdi
->
hdr
);
if
(
convertToAnsi
)
if
(
convertTo
Unicode
||
convertTo
Ansi
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
pdi
->
item
.
pszText
,
-
1
,
savPszText
,
savCchTextMax
);
if
(
convertToUnicode
)
/* note : pointer can be changed by app ! */
WideCharToMultiByte
(
CP_ACP
,
0
,
pdi
->
item
.
pszText
,
-
1
,
(
LPSTR
)
savPszText
,
savCchTextMax
,
NULL
,
NULL
);
else
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
pdi
->
item
.
pszText
,
-
1
,
savPszText
,
savCchTextMax
);
pdi
->
item
.
pszText
=
savPszText
;
/* restores our buffer */
pdi
->
item
.
cchTextMax
=
savCchTextMax
;
HeapFree
(
GetProcessHeap
(),
0
,
pszTempBuf
);
...
...
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