~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/programs/control/control.c

Version: ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  *   Control
  3  *   Copyright (C) 1998 by Marcel Baur <mbaur@g26.ethz.ch>
  4  *
  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.
  9  *
 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.
 14  *
 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 18  */
 19 
 20 #define WIN32_LEAN_AND_MEAN
 21 
 22 #include <stdio.h>
 23 #include <string.h>
 24 #include <windows.h>
 25 #include <shellapi.h>
 26 #include "params.h"
 27 
 28 extern void WINAPI Control_RunDLL(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow);
 29 static void launch(const char *what)
 30 {
 31   Control_RunDLL(GetDesktopWindow(), 0, what, SW_SHOW);
 32   ExitProcess(0);
 33 }
 34 
 35 int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszCmdLine, INT nCmdShow)
 36 {
 37     char szParams[255];
 38     strcpy(szParams, lpszCmdLine);
 39     CharUpperA(szParams);
 40 
 41     /* no parameters - pop up whole "Control Panel" by default */
 42     if (!*szParams) {
 43         launch("");
 44         return 0;
 45     }
 46 
 47     /* check for optional parameter */
 48     if (!strcmp(szParams,szP_DESKTOP))
 49         launch(szC_DESKTOP);
 50     if (!strcmp(szParams,szP_COLOR))
 51         launch(szC_COLOR);
 52     if (!strcmp(szParams,szP_DATETIME))
 53         launch(szC_DATETIME);
 54     if (!strcmp(szParams,szP_DESKTOP))
 55         launch(szC_DESKTOP);
 56     if (!strcmp(szParams,szP_INTERNATIONAL))
 57         launch(szC_INTERNATIONAL);
 58     if (!strcmp(szParams,szP_KEYBOARD))
 59         launch(szC_KEYBOARD);
 60     if (!strcmp(szParams,szP_MOUSE))
 61         launch(szC_MOUSE);
 62     if (!strcmp(szParams,szP_PORTS))
 63         launch(szC_PORTS);
 64     if (!strcmp(szParams,szP_PRINTERS))
 65         launch(szC_PRINTERS);
 66 
 67     /* try to launch if a .cpl file is given directly */
 68     launch(szParams);
 69     return 0;
 70 }
 71 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.