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
212c3604
Commit
212c3604
authored
Sep 25, 2007
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Sep 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Make the shell view control Unicode.
parent
70c20d7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
28 deletions
+28
-28
shlview.c
dlls/shell32/shlview.c
+28
-27
shlobj.h
include/shlobj.h
+0
-1
No files found.
dlls/shell32/shlview.c
View file @
212c3604
...
...
@@ -68,6 +68,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
shell
);
static
const
WCHAR
SV_CLASS_NAME
[]
=
{
'S'
,
'H'
,
'E'
,
'L'
,
'L'
,
'D'
,
'L'
,
'L'
,
'_'
,
'D'
,
'e'
,
'f'
,
'V'
,
'i'
,
'e'
,
'w'
,
0
};
typedef
struct
{
BOOL
bIsAscending
;
INT
nHeaderID
;
...
...
@@ -324,8 +326,8 @@ static BOOL ShellView_CreateList (IShellViewImpl * This)
if
(
This
->
FolderSettings
.
fFlags
&
FWF_NOCLIENTEDGE
)
dwExStyle
&=
~
WS_EX_CLIENTEDGE
;
This
->
hWndList
=
CreateWindowEx
A
(
dwExStyle
,
WC_LISTVIEW
A
,
This
->
hWndList
=
CreateWindowEx
W
(
dwExStyle
,
WC_LISTVIEW
W
,
NULL
,
dwStyle
,
0
,
0
,
0
,
0
,
...
...
@@ -1257,7 +1259,7 @@ static LRESULT ShellView_OnCommand(IShellViewImpl * This,DWORD dwCmdID, DWORD dw
static
LRESULT
ShellView_OnNotify
(
IShellViewImpl
*
This
,
UINT
CtlID
,
LPNMHDR
lpnmh
)
{
LPNMLISTVIEW
lpnmlv
=
(
LPNMLISTVIEW
)
lpnmh
;
NMLVDISPINFO
A
*
lpdi
=
(
NMLVDISPINFOA
*
)
lpnmh
;
NMLVDISPINFO
W
*
lpdi
=
(
NMLVDISPINFOW
*
)
lpnmh
;
LPITEMIDLIST
pidl
;
TRACE
(
"%p CtlID=%u lpnmh->code=%x
\n
"
,
This
,
CtlID
,
lpnmh
->
code
);
...
...
@@ -1302,8 +1304,8 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
if
(
OnDefaultCommand
(
This
)
!=
S_OK
)
ShellView_OpenSelectedItems
(
This
);
break
;
case
HDN_ENDTRACK
A
:
TRACE
(
"-- HDN_ENDTRACK
A
%p
\n
"
,
This
);
case
HDN_ENDTRACK
W
:
TRACE
(
"-- HDN_ENDTRACK
W
%p
\n
"
,
This
);
/*nColumn1 = ListView_GetColumnWidth(This->hWndList, 0);
nColumn2 = ListView_GetColumnWidth(This->hWndList, 1);*/
break
;
...
...
@@ -1338,7 +1340,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
}
This
->
ListViewSortInfo
.
nLastHeaderID
=
This
->
ListViewSortInfo
.
nHeaderID
;
SendMessage
A
(
lpnmlv
->
hdr
.
hwndFrom
,
LVM_SORTITEMS
,
(
WPARAM
)
&
This
->
ListViewSortInfo
,
(
LPARAM
)
ShellView_ListViewCompareItems
);
SendMessage
W
(
lpnmlv
->
hdr
.
hwndFrom
,
LVM_SORTITEMS
,
(
WPARAM
)
&
This
->
ListViewSortInfo
,
(
LPARAM
)
ShellView_ListViewCompareItems
);
break
;
case
LVN_GETDISPINFOA
:
...
...
@@ -1354,13 +1356,15 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
IShellFolder2_GetDetailsOf
(
This
->
pSF2Parent
,
pidl
,
lpdi
->
item
.
iSubItem
,
&
sd
);
if
(
lpnmh
->
code
==
LVN_GETDISPINFOA
)
{
StrRetToStrNA
(
lpdi
->
item
.
pszText
,
lpdi
->
item
.
cchTextMax
,
&
sd
.
str
,
NULL
);
TRACE
(
"-- text=%s
\n
"
,
lpdi
->
item
.
pszText
);
/* shouldn't happen */
NMLVDISPINFOA
*
lpdiA
=
(
NMLVDISPINFOA
*
)
lpnmh
;
StrRetToStrNA
(
lpdiA
->
item
.
pszText
,
lpdiA
->
item
.
cchTextMax
,
&
sd
.
str
,
NULL
);
TRACE
(
"-- text=%s
\n
"
,
lpdiA
->
item
.
pszText
);
}
else
/* LVN_GETDISPINFOW */
{
StrRetToStrNW
(
((
NMLVDISPINFOW
*
)
lpdi
)
->
item
.
pszText
,
lpdi
->
item
.
cchTextMax
,
&
sd
.
str
,
NULL
);
TRACE
(
"-- text=%s
\n
"
,
debugstr_w
(
(
WCHAR
*
)(
lpdi
->
item
.
pszText
)
));
StrRetToStrNW
(
lpdi
->
item
.
pszText
,
lpdi
->
item
.
cchTextMax
,
&
sd
.
str
,
NULL
);
TRACE
(
"-- text=%s
\n
"
,
debugstr_w
(
lpdi
->
item
.
pszText
));
}
}
else
...
...
@@ -1411,7 +1415,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
}
break
;
case
LVN_BEGINLABELEDIT
A
:
case
LVN_BEGINLABELEDIT
W
:
{
DWORD
dwAttr
=
SFGAO_CANRENAME
;
pidl
=
(
LPITEMIDLIST
)
lpdi
->
item
.
lParam
;
...
...
@@ -1426,30 +1430,27 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
return
TRUE
;
}
case
LVN_ENDLABELEDIT
A
:
case
LVN_ENDLABELEDIT
W
:
{
TRACE
(
"-- LVN_ENDLABELEDITA %p
\n
"
,
This
);
if
(
lpdi
->
item
.
pszText
)
{
HRESULT
hr
;
WCHAR
wszNewName
[
MAX_PATH
];
LVITEMA
lvItem
;
LVITEMW
lvItem
;
lvItem
.
iItem
=
lpdi
->
item
.
iItem
;
lvItem
.
iSubItem
=
0
;
lvItem
.
mask
=
LVIF_PARAM
;
SendMessage
A
(
This
->
hWndList
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
lvItem
);
SendMessage
W
(
This
->
hWndList
,
LVM_GETITEMW
,
0
,
(
LPARAM
)
&
lvItem
);
pidl
=
(
LPITEMIDLIST
)
lpdi
->
item
.
lParam
;
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
lpdi
->
item
.
pszText
,
-
1
,
wszNewName
,
MAX_PATH
))
wszNewName
[
MAX_PATH
-
1
]
=
0
;
hr
=
IShellFolder_SetNameOf
(
This
->
pSFParent
,
0
,
pidl
,
wszNewName
,
SHGDN_INFOLDER
,
&
pidl
);
hr
=
IShellFolder_SetNameOf
(
This
->
pSFParent
,
0
,
pidl
,
lpdi
->
item
.
pszText
,
SHGDN_INFOLDER
,
&
pidl
);
if
(
SUCCEEDED
(
hr
)
&&
pidl
)
{
lvItem
.
mask
=
LVIF_PARAM
;
lvItem
.
lParam
=
(
LPARAM
)
pidl
;
SendMessage
A
(
This
->
hWndList
,
LVM_SETITEMA
,
0
,
(
LPARAM
)
&
lvItem
);
SendMessage
W
(
This
->
hWndList
,
LVM_SETITEMW
,
0
,
(
LPARAM
)
&
lvItem
);
return
TRUE
;
}
}
...
...
@@ -1586,14 +1587,14 @@ static LRESULT ShellView_OnChange(IShellViewImpl * This, LPITEMIDLIST * Pidls, L
static
LRESULT
CALLBACK
ShellView_WndProc
(
HWND
hWnd
,
UINT
uMessage
,
WPARAM
wParam
,
LPARAM
lParam
)
{
IShellViewImpl
*
pThis
=
(
IShellViewImpl
*
)
GetWindowLongPtrW
(
hWnd
,
GWLP_USERDATA
);
LPCREATESTRUCT
A
lpcs
;
LPCREATESTRUCT
W
lpcs
;
TRACE
(
"(hwnd=%p msg=%x wparm=%lx lparm=%lx)
\n
"
,
hWnd
,
uMessage
,
wParam
,
lParam
);
switch
(
uMessage
)
{
case
WM_NCCREATE
:
lpcs
=
(
LPCREATESTRUCT
A
)
lParam
;
lpcs
=
(
LPCREATESTRUCT
W
)
lParam
;
pThis
=
(
IShellViewImpl
*
)(
lpcs
->
lpCreateParams
);
SetWindowLongPtrW
(
hWnd
,
GWLP_USERDATA
,
(
ULONG_PTR
)
pThis
);
pThis
->
hWnd
=
hWnd
;
/*set the window handle*/
...
...
@@ -1631,7 +1632,7 @@ static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wPara
break
;
}
return
DefWindowProc
A
(
hWnd
,
uMessage
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hWnd
,
uMessage
,
wParam
,
lParam
);
}
/**********************************************************
*
...
...
@@ -1847,7 +1848,7 @@ static HRESULT WINAPI IShellView_fnCreateViewWindow(
{
IShellViewImpl
*
This
=
(
IShellViewImpl
*
)
iface
;
WNDCLASS
A
wc
;
WNDCLASS
W
wc
;
*
phWnd
=
0
;
...
...
@@ -1871,7 +1872,7 @@ static HRESULT WINAPI IShellView_fnCreateViewWindow(
}
/*if our window class has not been registered, then do so*/
if
(
!
GetClassInfo
A
(
shell32_hInstance
,
SV_CLASS_NAME
,
&
wc
))
if
(
!
GetClassInfo
W
(
shell32_hInstance
,
SV_CLASS_NAME
,
&
wc
))
{
ZeroMemory
(
&
wc
,
sizeof
(
wc
));
wc
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
...
...
@@ -1880,16 +1881,16 @@ static HRESULT WINAPI IShellView_fnCreateViewWindow(
wc
.
cbWndExtra
=
0
;
wc
.
hInstance
=
shell32_hInstance
;
wc
.
hIcon
=
0
;
wc
.
hCursor
=
LoadCursor
A
(
0
,
(
LP
STR
)
IDC_ARROW
);
wc
.
hCursor
=
LoadCursor
W
(
0
,
(
LPW
STR
)
IDC_ARROW
);
wc
.
hbrBackground
=
(
HBRUSH
)
(
COLOR_WINDOW
+
1
);
wc
.
lpszMenuName
=
NULL
;
wc
.
lpszClassName
=
SV_CLASS_NAME
;
if
(
!
RegisterClass
A
(
&
wc
))
if
(
!
RegisterClass
W
(
&
wc
))
return
E_FAIL
;
}
*
phWnd
=
CreateWindowEx
A
(
0
,
*
phWnd
=
CreateWindowEx
W
(
0
,
SV_CLASS_NAME
,
NULL
,
WS_CHILD
|
WS_TABSTOP
,
...
...
include/shlobj.h
View file @
212c3604
...
...
@@ -149,7 +149,6 @@ typedef struct
*/
typedef
GUID
SHELLVIEWID
;
#define SV_CLASS_NAME ("SHELLDLL_DefView")
#define FCIDM_SHVIEWFIRST 0x0000
/* undocumented */
...
...
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