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
e45d29cd
Commit
e45d29cd
authored
Dec 11, 2003
by
Richard Cohen
Committed by
Alexandre Julliard
Dec 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Check FindFirstFile against INVALID_HANDLE_VALUE not 0.
- Display window & messagebox even if there are no applets.
parent
ca10d8a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
control.c
dlls/shell32/control.c
+17
-6
No files found.
dlls/shell32/control.c
View file @
e45d29cd
...
...
@@ -268,7 +268,12 @@ static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
Control_WndProc_Create
(
hWnd
,
(
CREATESTRUCTA
*
)
lParam2
);
return
0
;
case
WM_DESTROY
:
while
((
panel
->
first
=
Control_UnloadApplet
(
panel
->
first
)));
{
CPlApplet
*
applet
=
panel
->
first
;
while
(
applet
)
applet
=
Control_UnloadApplet
(
applet
);
}
PostQuitMessage
(
0
);
break
;
case
WM_PAINT
:
return
Control_WndProc_Paint
(
panel
,
lParam1
);
...
...
@@ -288,7 +293,7 @@ static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
{
WNDCLASSA
wc
;
MSG
msg
;
const
CHAR
*
appName
=
"Wine Control Panel"
;
wc
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
wc
.
lpfnWndProc
=
Control_WndProc
;
wc
.
cbClsExtra
=
0
;
...
...
@@ -302,16 +307,22 @@ static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
if
(
!
RegisterClassA
(
&
wc
))
return
;
CreateWindowExA
(
0
,
wc
.
lpszClassName
,
"Wine Control Panel"
,
CreateWindowExA
(
0
,
wc
.
lpszClassName
,
appName
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
hWnd
,
NULL
,
hInst
,
panel
);
if
(
!
panel
->
hWnd
)
return
;
if
(
!
panel
->
first
)
{
/* FIXME appName & message should be localized */
MessageBoxA
(
panel
->
hWnd
,
"Cannot load any applets"
,
appName
,
MB_OK
);
return
;
}
while
(
GetMessageA
(
&
msg
,
panel
->
hWnd
,
0
,
0
))
{
TranslateMessage
(
&
msg
);
DispatchMessageA
(
&
msg
);
if
(
!
panel
->
first
)
break
;
}
}
...
...
@@ -328,7 +339,7 @@ static void Control_DoWindow(CPanel* panel, HWND hWnd, HINSTANCE hInst)
*
p
++
=
'\\'
;
lstrcpyW
(
p
,
wszAllCpl
);
if
((
h
=
FindFirstFileW
(
buffer
,
&
fd
))
!=
0
)
{
if
((
h
=
FindFirstFileW
(
buffer
,
&
fd
))
!=
INVALID_HANDLE_VALUE
)
{
do
{
lstrcpyW
(
p
,
fd
.
cFileName
);
Control_LoadApplet
(
hWnd
,
buffer
,
panel
);
...
...
@@ -336,7 +347,7 @@ static void Control_DoWindow(CPanel* panel, HWND hWnd, HINSTANCE hInst)
FindClose
(
h
);
}
if
(
panel
->
first
)
Control_DoInterface
(
panel
,
hWnd
,
hInst
);
Control_DoInterface
(
panel
,
hWnd
,
hInst
);
}
static
void
Control_DoLaunch
(
CPanel
*
panel
,
HWND
hWnd
,
LPCWSTR
wszCmd
)
...
...
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