3 * Copyright (C) 1998 by Marcel Baur <mbaur@g26.ethz.ch>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 void launch(const char *what)
28 extern void WINAPI Control_RunDLL(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow);
30 Control_RunDLL(GetDesktopWindow(), 0, what, SW_SHOW);
34 int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, CHAR *szParam, INT argc)
38 lstrcpy(szParams, szParam);
42 case 0: /* no parameters - pop up whole "Control Panel" by default */
46 case 1: /* check for optional parameter */
47 if (!strcmp(szParams,szP_DESKTOP))
49 if (!strcmp(szParams,szP_COLOR))
51 if (!strcmp(szParams,szP_DATETIME))
53 if (!strcmp(szParams,szP_DESKTOP))
55 if (!strcmp(szParams,szP_INTERNATIONAL))
56 launch(szC_INTERNATIONAL);
57 if (!strcmp(szParams,szP_KEYBOARD))
59 if (!strcmp(szParams,szP_MOUSE))
61 if (!strcmp(szParams,szP_PORTS))
63 if (!strcmp(szParams,szP_PRINTERS))
66 /* try to launch if a .cpl file is given directly */
70 default: printf("Syntax error.");