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
a2a47baa
Commit
a2a47baa
authored
Apr 27, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Apr 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control: Convert application to Unicode.
parent
5a195bda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
75 deletions
+50
-75
Makefile.in
programs/control/Makefile.in
+1
-1
control.c
programs/control/control.c
+49
-32
params.h
programs/control/params.h
+0
-42
No files found.
programs/control/Makefile.in
View file @
a2a47baa
...
@@ -4,7 +4,7 @@ TOPOBJDIR = ../..
...
@@ -4,7 +4,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
control.exe
MODULE
=
control.exe
APPMODE
=
-mwindows
APPMODE
=
-mwindows
-municode
IMPORTS
=
shell32 user32 kernel32
IMPORTS
=
shell32 user32 kernel32
C_SRCS
=
control.c
C_SRCS
=
control.c
...
...
programs/control/control.c
View file @
a2a47baa
/*
/*
* Control
* Start a control panel applet or open the control panel window
*
* Copyright (C) 1998 by Marcel Baur <mbaur@g26.ethz.ch>
* Copyright (C) 1998 by Marcel Baur <mbaur@g26.ethz.ch>
* Copyright 2010 Detlef Riekenberg
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -23,48 +25,63 @@
...
@@ -23,48 +25,63 @@
#include <string.h>
#include <string.h>
#include <windows.h>
#include <windows.h>
#include <shellapi.h>
#include <shellapi.h>
#include "params.h"
extern
void
WINAPI
Control_RunDLL
(
HWND
hWnd
,
HINSTANCE
hInst
,
LPCSTR
cmd
,
DWORD
nCmdShow
);
/* alphabetical list of recognized optional command line parameters */
static
void
launch
(
const
char
*
what
)
static
const
WCHAR
szP_COLOR
[]
=
{
'C'
,
'O'
,
'L'
,
'O'
,
'R'
,
0
};
static
const
WCHAR
szP_DATETIME
[]
=
{
'D'
,
'A'
,
'T'
,
'E'
,
'/'
,
'T'
,
'I'
,
'M'
,
'E'
,
0
};
static
const
WCHAR
szP_DESKTOP
[]
=
{
'D'
,
'E'
,
'S'
,
'K'
,
'T'
,
'O'
,
'P'
,
0
};
static
const
WCHAR
szP_INTERNATIONAL
[]
=
{
'I'
,
'N'
,
'T'
,
'E'
,
'R'
,
'N'
,
'A'
,
'T'
,
'I'
,
'O'
,
'N'
,
'A'
,
'L'
,
0
};
static
const
WCHAR
szP_KEYBOARD
[]
=
{
'K'
,
'E'
,
'Y'
,
'B'
,
'O'
,
'A'
,
'R'
,
'D'
,
0
};
static
const
WCHAR
szP_MOUSE
[]
=
{
'M'
,
'O'
,
'U'
,
'S'
,
'E'
,
0
};
static
const
WCHAR
szP_PORTS
[]
=
{
'P'
,
'O'
,
'R'
,
'T'
,
'S'
,
0
};
static
const
WCHAR
szP_PRINTERS
[]
=
{
'P'
,
'R'
,
'I'
,
'N'
,
'T'
,
'E'
,
'R'
,
'S'
,
0
};
/* alphabetical list of appropriate commands to execute */
static
const
WCHAR
szC_COLOR
[]
=
{
'd'
,
'e'
,
's'
,
'k'
,
'.'
,
'c'
,
'p'
,
'l'
,
','
,
','
,
'2'
,
0
};
static
const
WCHAR
szC_DATETIME
[]
=
{
't'
,
'i'
,
'm'
,
'e'
,
'd'
,
'a'
,
't'
,
'e'
,
'.'
,
'c'
,
'p'
,
'l'
,
0
};
static
const
WCHAR
szC_DESKTOP
[]
=
{
'd'
,
'e'
,
's'
,
'k'
,
'.'
,
'c'
,
'p'
,
'l'
,
0
};
static
const
WCHAR
szC_FONTS
[]
=
{
'm'
,
'a'
,
'i'
,
'n'
,
'.'
,
'c'
,
'p'
,
'l'
,
' '
,
'@'
,
'3'
,
0
};
static
const
WCHAR
szC_INTERNATIONAL
[]
=
{
'i'
,
'n'
,
't'
,
'l'
,
'.'
,
'c'
,
'p'
,
'l'
,
0
};
static
const
WCHAR
szC_KEYBOARD
[]
=
{
'm'
,
'a'
,
'i'
,
'n'
,
'.'
,
'c'
,
'p'
,
'l'
,
' '
,
'@'
,
'1'
,
0
};
static
const
WCHAR
szC_MOUSE
[]
=
{
'm'
,
'a'
,
'i'
,
'n'
,
'.'
,
'c'
,
'p'
,
'l'
,
0
};
static
const
WCHAR
szC_PORTS
[]
=
{
's'
,
'y'
,
's'
,
'd'
,
'm'
,
'.'
,
'c'
,
'p'
,
'l'
,
','
,
','
,
'1'
,
0
};
static
const
WCHAR
szC_PRINTERS
[]
=
{
'm'
,
'a'
,
'i'
,
'n'
,
'.'
,
'c'
,
'p'
,
'l'
,
' '
,
'@'
,
'2'
,
0
};
extern
void
WINAPI
Control_RunDLLW
(
HWND
hWnd
,
HINSTANCE
hInst
,
LPCWSTR
cmd
,
DWORD
nCmdShow
);
static
void
launch
(
LPCWSTR
what
)
{
{
Control_RunDLL
(
GetDesktopWindow
(),
0
,
what
,
SW_SHOW
);
Control_RunDLL
W
(
GetDesktopWindow
(),
0
,
what
,
SW_SHOW
);
ExitProcess
(
0
);
ExitProcess
(
0
);
}
}
int
WINAPI
WinMain
(
HINSTANCE
hInst
,
HINSTANCE
hPrev
,
LP
STR
lpszCmdLine
,
INT
nCmdShow
)
int
WINAPI
wWinMain
(
HINSTANCE
hInst
,
HINSTANCE
hPrev
,
LPW
STR
lpszCmdLine
,
INT
nCmdShow
)
{
{
char
szParams
[
255
];
strcpy
(
szParams
,
lpszCmdLine
);
CharUpperA
(
szParams
);
/* no parameters - pop up whole "Control Panel" by default */
/* no parameters - pop up whole "Control Panel" by default */
if
(
!*
szParams
)
{
if
(
!*
lpszCmdLine
)
{
launch
(
""
);
launch
(
lpszCmdLine
);
return
0
;
}
}
/* check for optional parameter */
/* check for optional parameter */
if
(
!
strcmp
(
szParams
,
szP_DESKTOP
))
if
(
!
lstrcmpiW
(
lpszCmdLine
,
szP_COLOR
))
launch
(
szC_DESKTOP
);
launch
(
szC_COLOR
);
if
(
!
strcmp
(
szParams
,
szP_COLOR
))
if
(
!
lstrcmpiW
(
lpszCmdLine
,
szP_DATETIME
))
launch
(
szC_COLOR
);
launch
(
szC_DATETIME
);
if
(
!
strcmp
(
szParams
,
szP_DATETIME
))
if
(
!
lstrcmpiW
(
lpszCmdLine
,
szP_DESKTOP
))
launch
(
szC_DATETIME
);
launch
(
szC_DESKTOP
);
if
(
!
strcmp
(
szParams
,
szP_DESKTOP
))
if
(
!
lstrcmpiW
(
lpszCmdLine
,
szP_INTERNATIONAL
))
launch
(
szC_DESKTOP
);
launch
(
szC_INTERNATIONAL
);
if
(
!
strcmp
(
szParams
,
szP_INTERNATIONAL
))
if
(
!
lstrcmpiW
(
lpszCmdLine
,
szP_KEYBOARD
))
launch
(
szC_INTERNATIONAL
);
launch
(
szC_KEYBOARD
);
if
(
!
strcmp
(
szParams
,
szP_KEYBOARD
))
if
(
!
lstrcmpiW
(
lpszCmdLine
,
szP_MOUSE
))
launch
(
szC_KEYBOARD
);
launch
(
szC_MOUSE
);
if
(
!
strcmp
(
szParams
,
szP_MOUSE
))
if
(
!
lstrcmpiW
(
lpszCmdLine
,
szP_PORTS
))
launch
(
szC_MOUSE
);
launch
(
szC_PORTS
);
if
(
!
strcmp
(
szParams
,
szP_PORTS
))
if
(
!
lstrcmpiW
(
lpszCmdLine
,
szP_PRINTERS
))
launch
(
szC_PORTS
);
launch
(
szC_PRINTERS
);
if
(
!
strcmp
(
szParams
,
szP_PRINTERS
))
launch
(
szC_PRINTERS
);
/* try to launch if a .cpl file is given directly */
/* try to launch if a .cpl file is given directly */
launch
(
szParams
);
launch
(
lpszCmdLine
);
return
0
;
return
0
;
}
}
programs/control/params.h
deleted
100644 → 0
View file @
5a195bda
/*
* Control
* Copyright (C) 1998 by Marcel Baur <mbaur@g26.ethz.ch>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* alphabetical list of recognized optional command line parameters */
#define szP_COLOR "COLOR"
#define szP_DATETIME "DATE/TIME"
#define szP_DESKTOP "DESKTOP"
#define szP_INTERNATIONAL "INTERNATIONAL"
#define szP_KEYBOARD "KEYBOARD"
#define szP_MOUSE "MOUSE"
#define szP_PORTS "PORTS"
#define szP_PRINTERS "PRINTERS"
/* alphabetical list of appropriate commands to execute */
#define szC_COLOR "desk.cpl,,2"
#define szC_DATETIME "timedate.cpl"
#define szC_DESKTOP "desk.cpl"
#define szC_FONTS "main.cpl @3"
#define szC_INTERNATIONAL "intl.cpl"
#define szC_KEYBOARD "main.cpl @1"
#define szC_MOUSE "main.cpl"
#define szC_PORTS "sysdm.cpl,,1"
#define szC_PRINTERS "main.cpl @2"
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