Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5e3786f8
Commit
5e3786f8
authored
Jul 21, 2008
by
Owen Rudge
Committed by
Alexandre Julliard
Jul 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Use wide functions when creating control panel.
parent
4ae7a87e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
control.c
dlls/shell32/control.c
+16
-12
No files found.
dlls/shell32/control.c
View file @
5e3786f8
...
...
@@ -159,11 +159,11 @@ CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel)
return
NULL
;
}
static
void
Control_WndProc_Create
(
HWND
hWnd
,
const
CREATESTRUCT
A
*
cs
)
static
void
Control_WndProc_Create
(
HWND
hWnd
,
const
CREATESTRUCT
W
*
cs
)
{
CPanel
*
panel
=
(
CPanel
*
)
cs
->
lpCreateParams
;
SetWindowLongPtr
A
(
hWnd
,
0
,
(
LONG_PTR
)
panel
);
SetWindowLongPtr
W
(
hWnd
,
0
,
(
LONG_PTR
)
panel
);
panel
->
status
=
0
;
panel
->
hWnd
=
hWnd
;
}
...
...
@@ -254,12 +254,12 @@ static LRESULT Control_WndProc_LButton(CPanel* panel, LPARAM lParam, BOOL up)
static
LRESULT
WINAPI
Control_WndProc
(
HWND
hWnd
,
UINT
wMsg
,
WPARAM
lParam1
,
LPARAM
lParam2
)
{
CPanel
*
panel
=
(
CPanel
*
)
GetWindowLongPtr
A
(
hWnd
,
0
);
CPanel
*
panel
=
(
CPanel
*
)
GetWindowLongPtr
W
(
hWnd
,
0
);
if
(
panel
||
wMsg
==
WM_CREATE
)
{
switch
(
wMsg
)
{
case
WM_CREATE
:
Control_WndProc_Create
(
hWnd
,
(
CREATESTRUCT
A
*
)
lParam2
);
Control_WndProc_Create
(
hWnd
,
(
CREATESTRUCT
W
*
)
lParam2
);
return
0
;
case
WM_DESTROY
:
{
...
...
@@ -280,14 +280,18 @@ static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
}
}
return
DefWindowProc
A
(
hWnd
,
wMsg
,
lParam1
,
lParam2
);
return
DefWindowProc
W
(
hWnd
,
wMsg
,
lParam1
,
lParam2
);
}
static
void
Control_DoInterface
(
CPanel
*
panel
,
HWND
hWnd
,
HINSTANCE
hInst
)
{
WNDCLASS
A
wc
;
WNDCLASS
W
wc
;
MSG
msg
;
const
CHAR
*
appName
=
"Wine Control Panel"
;
const
WCHAR
appName
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
0
};
const
WCHAR
className
[]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
'_'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'_'
,
'W'
,
'n'
,
'd'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
0
};
wc
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
wc
.
lpfnWndProc
=
Control_WndProc
;
wc
.
cbClsExtra
=
0
;
...
...
@@ -297,20 +301,20 @@ static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
wc
.
hCursor
=
0
;
wc
.
hbrBackground
=
GetStockObject
(
WHITE_BRUSH
);
wc
.
lpszMenuName
=
NULL
;
wc
.
lpszClassName
=
"Shell_Control_WndClass"
;
wc
.
lpszClassName
=
className
;
if
(
!
RegisterClass
A
(
&
wc
))
return
;
if
(
!
RegisterClass
W
(
&
wc
))
return
;
CreateWindowEx
A
(
0
,
wc
.
lpszClassName
,
appName
,
CreateWindowEx
W
(
0
,
wc
.
lpszClassName
,
appName
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
hWnd
,
NULL
,
hInst
,
panel
);
if
(
!
panel
->
hWnd
)
return
;
while
(
GetMessage
A
(
&
msg
,
panel
->
hWnd
,
0
,
0
))
{
while
(
GetMessage
W
(
&
msg
,
panel
->
hWnd
,
0
,
0
))
{
TranslateMessage
(
&
msg
);
DispatchMessage
A
(
&
msg
);
DispatchMessage
W
(
&
msg
);
}
}
...
...
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