joy.cpl: Enable visual styles.

joy.cpl uses manifest at ID 124. According to tests, manifest at ID 124 is not loaded automatically
by rundll32.exe or Control_RunDLL().

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2022-04-13 17:41:10 +08:00 committed by Alexandre Julliard
parent 0d093f8935
commit 9ec0f8a3d5
3 changed files with 36 additions and 0 deletions

16
dlls/joy.cpl/joy.manifest Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="Wine.Joy" version="0.0.0.0"/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

View File

@ -77,6 +77,9 @@ FONT 8, "Ms Shell Dlg"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* @makedep: joy.manifest */
124 RT_MANIFEST joy.manifest
/* @makedep: joy.ico */
ICO_MAIN ICON "joy.ico"

View File

@ -992,10 +992,24 @@ static void display_cpl_sheets(HWND parent, struct JoystickData *data)
{
INITCOMMONCONTROLSEX icex;
PROPSHEETPAGEW psp[NUM_PROPERTY_PAGES];
BOOL activated = FALSE;
PROPSHEETHEADERW psh;
ULONG_PTR cookie;
ACTCTXW actctx;
HANDLE context;
DWORD id = 0;
OleInitialize(NULL);
/* Activate context */
memset(&actctx, 0, sizeof(actctx));
actctx.cbSize = sizeof(actctx);
actctx.hModule = hcpl;
actctx.lpResourceName = MAKEINTRESOURCEW(124);
actctx.dwFlags = ACTCTX_FLAG_HMODULE_VALID | ACTCTX_FLAG_RESOURCE_NAME_VALID;
context = CreateActCtxW(&actctx);
if (context != INVALID_HANDLE_VALUE)
activated = ActivateActCtx(context, &cookie);
/* Initialize common controls */
icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
icex.dwICC = ICC_LISTVIEW_CLASSES | ICC_BAR_CLASSES;
@ -1039,6 +1053,9 @@ static void display_cpl_sheets(HWND parent, struct JoystickData *data)
/* display the dialog */
PropertySheetW(&psh);
if (activated)
DeactivateActCtx(0, cookie);
ReleaseActCtx(context);
OleUninitialize();
}