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
b965a5f0
Commit
b965a5f0
authored
Dec 08, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Dec 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Cope with non-English Vista+ and short names in the title bar of explorer windows.
parent
715a3988
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
progman_dde.c
dlls/shell32/tests/progman_dde.c
+29
-2
No files found.
dlls/shell32/tests/progman_dde.c
View file @
b965a5f0
...
...
@@ -66,6 +66,7 @@
#define DDE_TEST_NUMMASK 0x0000ffff
static
HRESULT
(
WINAPI
*
pSHGetLocalizedName
)(
LPCWSTR
,
LPWSTR
,
UINT
,
int
*
);
static
BOOL
(
WINAPI
*
pSHGetSpecialFolderPathA
)(
HWND
,
LPSTR
,
int
,
BOOL
);
static
BOOL
(
WINAPI
*
pReadCabinetState
)(
CABINETSTATE
*
,
int
);
...
...
@@ -74,6 +75,7 @@ static void init_function_pointers(void)
HMODULE
hmod
;
hmod
=
GetModuleHandleA
(
"shell32.dll"
);
pSHGetLocalizedName
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHGetLocalizedName"
);
pSHGetSpecialFolderPathA
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHGetSpecialFolderPathA"
);
pReadCabinetState
=
(
void
*
)
GetProcAddress
(
hmod
,
"ReadCabinetState"
);
if
(
!
pReadCabinetState
)
...
...
@@ -102,7 +104,7 @@ static void init_strings(void)
/* Win9x */
lstrcpyA
(
CommonPrograms
,
Programs
);
}
if
(
GetProcAddress
(
GetModuleHandleA
(
"shell32.dll"
),
"SHGetKnownFolderPath"
)
)
if
(
pSHGetLocalizedName
)
{
/* Vista and higher use CSIDL_PROGRAMS for these tests.
* Wine doesn't have SHGetKnownFolderPath yet but should most likely follow
...
...
@@ -154,7 +156,32 @@ static void init_strings(void)
}
else
{
lstrcpyA
(
StartupTitle
,
Startup
);
/* Vista has the nice habit of displaying the full path in English
* and the short one localized. CSIDL_STARTUP on Vista gives us the
* English version so we have to 'translate' this one.
*
* MSDN claims it should be used for files not folders but this one
* suits our purposes just fine.
*/
if
(
pSHGetLocalizedName
)
{
WCHAR
startupW
[
MAX_PATH
];
WCHAR
module
[
MAX_PATH
];
WCHAR
module_expanded
[
MAX_PATH
];
WCHAR
localized
[
MAX_PATH
];
int
id
;
MultiByteToWideChar
(
CP_ACP
,
0
,
startup
,
-
1
,
startupW
,
sizeof
(
startupW
)
/
sizeof
(
WCHAR
));
pSHGetLocalizedName
(
startupW
,
module
,
MAX_PATH
,
&
id
);
ExpandEnvironmentStringsW
(
module
,
module_expanded
,
MAX_PATH
);
LoadStringW
(
GetModuleHandleW
(
module_expanded
),
id
,
localized
,
MAX_PATH
);
WideCharToMultiByte
(
CP_ACP
,
0
,
localized
,
-
1
,
StartupTitle
,
sizeof
(
StartupTitle
),
NULL
,
NULL
);
}
else
{
lstrcpyA
(
StartupTitle
,
(
strrchr
(
startup
,
'\\'
)
+
1
));
}
}
}
...
...
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