3 * Copyright (C) 1998 by Marcel Baur <mbaur@g26.ethz.ch>
4 * To be distributed under the Wine license
13 void launch(char what[255])
16 FARPROC pControl_RunDLL;
18 hMod = LoadLibrary("shell32.dll");
19 pControl_RunDLL = GetProcAddress(hMod, "Control_RunDLL");
20 pControl_RunDLL(GetDesktopWindow(), 0, what, SW_SHOW);
25 int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, CHAR *szParam, INT argc)
29 lstrcpy(szParams, szParam);
33 case 0: /* no parameters - pop up whole "Control Panel" by default */
37 case 1: /* check for optional parameter */
38 if (!strcmp(szParams,szP_DESKTOP))
40 if (!strcmp(szParams,szP_COLOR))
42 if (!strcmp(szParams,szP_DATETIME))
44 if (!strcmp(szParams,szP_DESKTOP))
46 if (!strcmp(szParams,szP_INTERNATIONAL))
47 launch(szC_INTERNATIONAL);
48 if (!strcmp(szParams,szP_KEYBOARD))
50 if (!strcmp(szParams,szP_MOUSE))
52 if (!strcmp(szParams,szP_PORTS))
54 if (!strcmp(szParams,szP_PRINTERS))
57 /* try to launch if a .cpl file is given directly */
61 default: printf("Syntax error.");