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
d645cd14
Commit
d645cd14
authored
Nov 27, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
joy.cpl: Use designated initializers in display_cpl_sheets.
parent
63758578
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
64 deletions
+54
-64
main.c
dlls/joy.cpl/main.c
+54
-64
No files found.
dlls/joy.cpl/main.c
View file @
d645cd14
...
...
@@ -950,73 +950,63 @@ static int CALLBACK propsheet_callback(HWND hwnd, UINT msg, LPARAM lparam)
return
0
;
}
/******************************************************************************
* display_cpl_sheets [internal]
*
* Build and display the dialog with all control panel propertysheets
*
*/
static
void
display_cpl_sheets
(
HWND
parent
,
struct
JoystickData
*
data
)
static
void
display_cpl_sheets
(
HWND
parent
,
struct
JoystickData
*
data
)
{
INITCOMMONCONTROLSEX
icex
;
BOOL
activated
=
FALSE
;
PROPSHEETPAGEW
psp
[
2
];
PROPSHEETHEADERW
psh
;
INITCOMMONCONTROLSEX
init
=
{
.
dwSize
=
sizeof
(
INITCOMMONCONTROLSEX
),
.
dwICC
=
ICC_LISTVIEW_CLASSES
|
ICC_BAR_CLASSES
,
};
PROPSHEETPAGEW
pages
[]
=
{
{
.
dwSize
=
sizeof
(
PROPSHEETPAGEW
),
.
hInstance
=
hcpl
,
.
u
.
pszTemplate
=
MAKEINTRESOURCEW
(
IDD_LIST
),
.
pfnDlgProc
=
list_dlgproc
,
.
lParam
=
(
INT_PTR
)
data
,
},
{
.
dwSize
=
sizeof
(
PROPSHEETPAGEW
),
.
hInstance
=
hcpl
,
.
u
.
pszTemplate
=
MAKEINTRESOURCEW
(
IDD_TEST_DI
),
.
pfnDlgProc
=
test_dlgproc
,
.
lParam
=
(
INT_PTR
)
data
,
},
};
PROPSHEETHEADERW
header
=
{
.
dwSize
=
sizeof
(
PROPSHEETHEADERW
),
.
dwFlags
=
PSH_PROPSHEETPAGE
|
PSH_USEICONID
|
PSH_USECALLBACK
,
.
hwndParent
=
parent
,
.
hInstance
=
hcpl
,
.
pszCaption
=
MAKEINTRESOURCEW
(
IDS_CPL_NAME
),
.
nPages
=
ARRAY_SIZE
(
pages
),
.
u3
.
ppsp
=
pages
,
.
pfnCallback
=
propsheet_callback
,
};
ACTCTXW
context_desc
=
{
.
cbSize
=
sizeof
(
ACTCTXW
),
.
hModule
=
hcpl
,
.
lpResourceName
=
MAKEINTRESOURCEW
(
124
),
.
dwFlags
=
ACTCTX_FLAG_HMODULE_VALID
|
ACTCTX_FLAG_RESOURCE_NAME_VALID
,
};
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
;
InitCommonControlsEx
(
&
icex
);
ZeroMemory
(
&
psh
,
sizeof
(
psh
));
ZeroMemory
(
psp
,
sizeof
(
psp
));
/* Fill out all PROPSHEETPAGE */
psp
[
id
].
dwSize
=
sizeof
(
PROPSHEETPAGEW
);
psp
[
id
].
hInstance
=
hcpl
;
psp
[
id
].
u
.
pszTemplate
=
MAKEINTRESOURCEW
(
IDD_LIST
);
psp
[
id
].
pfnDlgProc
=
list_dlgproc
;
psp
[
id
].
lParam
=
(
INT_PTR
)
data
;
id
++
;
psp
[
id
].
dwSize
=
sizeof
(
PROPSHEETPAGEW
);
psp
[
id
].
hInstance
=
hcpl
;
psp
[
id
].
u
.
pszTemplate
=
MAKEINTRESOURCEW
(
IDD_TEST_DI
);
psp
[
id
].
pfnDlgProc
=
test_dlgproc
;
psp
[
id
].
lParam
=
(
INT_PTR
)
data
;
id
++
;
/* Fill out the PROPSHEETHEADER */
psh
.
dwSize
=
sizeof
(
PROPSHEETHEADERW
);
psh
.
dwFlags
=
PSH_PROPSHEETPAGE
|
PSH_USEICONID
|
PSH_USECALLBACK
;
psh
.
hwndParent
=
parent
;
psh
.
hInstance
=
hcpl
;
psh
.
pszCaption
=
MAKEINTRESOURCEW
(
IDS_CPL_NAME
);
psh
.
nPages
=
id
;
psh
.
u3
.
ppsp
=
psp
;
psh
.
pfnCallback
=
propsheet_callback
;
/* display the dialog */
PropertySheetW
(
&
psh
);
if
(
activated
)
DeactivateActCtx
(
0
,
cookie
);
ReleaseActCtx
(
context
);
BOOL
activated
;
OleInitialize
(
NULL
);
context
=
CreateActCtxW
(
&
context_desc
);
if
(
context
==
INVALID_HANDLE_VALUE
)
activated
=
FALSE
;
else
activated
=
ActivateActCtx
(
context
,
&
cookie
);
InitCommonControlsEx
(
&
init
);
PropertySheetW
(
&
header
);
if
(
activated
)
DeactivateActCtx
(
0
,
cookie
);
ReleaseActCtx
(
context
);
OleUninitialize
();
}
...
...
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