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

Wine Cross Reference
wine/dlls/inetcpl.cpl/inetcpl.c

Version: ~ [ wine-1.5.31 ] ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ 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  * Internet control panel applet
  3  *
  4  * Copyright 2010 Detlef Riekenberg
  5  *
  6  * This library is free software; you can redistribute it and/or
  7  * modify it under the terms of the GNU Lesser General Public
  8  * License as published by the Free Software Foundation; either
  9  * version 2.1 of the License, or (at your option) any later version.
 10  *
 11  * This library is distributed in the hope that it will be useful,
 12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 14  * Lesser General Public License for more details.
 15  *
 16  * You should have received a copy of the GNU Lesser General Public
 17  * License along with this library; if not, write to the Free Software
 18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 19  *
 20  */
 21 
 22 #define NONAMELESSUNION
 23 #define COBJMACROS
 24 #define CONST_VTABLE
 25 
 26 #include <stdarg.h>
 27 #include <windef.h>
 28 #include <winbase.h>
 29 #include <wingdi.h>
 30 #include <winuser.h>
 31 #include <commctrl.h>
 32 #include <cpl.h>
 33 #include "ole2.h"
 34 
 35 #include "wine/debug.h"
 36 
 37 #include "inetcpl.h"
 38 
 39 
 40 WINE_DEFAULT_DEBUG_CHANNEL(inetcpl);
 41 
 42 DECLSPEC_HIDDEN HMODULE hcpl;
 43 
 44 /*********************************************************************
 45  *  DllMain (inetcpl.@)
 46  */
 47 BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved)
 48 {
 49     TRACE("(%p, %d, %p)\n", hdll, reason, reserved);
 50 
 51     switch (reason)
 52     {
 53         case DLL_WINE_PREATTACH:
 54             return FALSE;  /* prefer native version */
 55 
 56         case DLL_PROCESS_ATTACH:
 57             DisableThreadLibraryCalls(hdll);
 58             hcpl = hdll;
 59     }
 60     return TRUE;
 61 }
 62 
 63 /***********************************************************************
 64  *  DllInstall (inetcpl.@)
 65  */
 66 HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
 67 {
 68     FIXME("(%s, %s): stub\n", bInstall ? "TRUE" : "FALSE", debugstr_w(cmdline));
 69     return S_OK;
 70 }
 71 
 72 /******************************************************************************
 73  * propsheet_callback [internal]
 74  *
 75  */
 76 static int CALLBACK propsheet_callback(HWND hwnd, UINT msg, LPARAM lparam)
 77 {
 78 
 79     TRACE("(%p, 0x%08x/%d, 0x%lx)\n", hwnd, msg, msg, lparam);
 80     switch (msg)
 81     {
 82         case PSCB_INITIALIZED:
 83             SendMessageW(hwnd, WM_SETICON, ICON_BIG, (LPARAM) LoadIconW(hcpl, MAKEINTRESOURCEW(ICO_MAIN)));
 84             break;
 85     }
 86     return 0;
 87 }
 88 
 89 /******************************************************************************
 90  * display_cpl_sheets [internal]
 91  *
 92  * Build and display the dialog with all control panel propertysheets
 93  *
 94  */
 95 static void display_cpl_sheets(HWND parent)
 96 {
 97     INITCOMMONCONTROLSEX icex;
 98     PROPSHEETPAGEW psp[NUM_PROPERTY_PAGES];
 99     PROPSHEETHEADERW psh;
100     DWORD id = 0;
101 
102     OleInitialize(NULL);
103     /* Initialize common controls */
104     icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
105     icex.dwICC = ICC_LISTVIEW_CLASSES | ICC_BAR_CLASSES;
106     InitCommonControlsEx(&icex);
107 
108     ZeroMemory(&psh, sizeof(psh));
109     ZeroMemory(psp, sizeof(psp));
110 
111     /* Fill out all PROPSHEETPAGE */
112     psp[id].dwSize = sizeof (PROPSHEETPAGEW);
113     psp[id].hInstance = hcpl;
114     psp[id].u.pszTemplate = MAKEINTRESOURCEW(IDD_GENERAL);
115     psp[id].pfnDlgProc = general_dlgproc;
116     id++;
117 
118     psp[id].dwSize = sizeof (PROPSHEETPAGEW);
119     psp[id].hInstance = hcpl;
120     psp[id].u.pszTemplate = MAKEINTRESOURCEW(IDD_SECURITY);
121     psp[id].pfnDlgProc = security_dlgproc;
122     id++;
123 
124     psp[id].dwSize = sizeof (PROPSHEETPAGEW);
125     psp[id].hInstance = hcpl;
126     psp[id].u.pszTemplate = MAKEINTRESOURCEW(IDD_CONTENT);
127     psp[id].pfnDlgProc = content_dlgproc;
128     id++;
129 
130     /* Fill out the PROPSHEETHEADER */
131     psh.dwSize = sizeof (PROPSHEETHEADERW);
132     psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USEICONID | PSH_USECALLBACK;
133     psh.hwndParent = parent;
134     psh.hInstance = hcpl;
135     psh.u.pszIcon = MAKEINTRESOURCEW(ICO_MAIN);
136     psh.pszCaption = MAKEINTRESOURCEW(IDS_CPL_NAME);
137     psh.nPages = id;
138     psh.u3.ppsp = psp;
139     psh.pfnCallback = propsheet_callback;
140 
141     /* display the dialog */
142     PropertySheetW(&psh);
143 
144     OleUninitialize();
145 }
146 
147 /*********************************************************************
148  * CPlApplet (inetcpl.@)
149  *
150  * Control Panel entry point
151  *
152  * PARAMS
153  *  hWnd    [I] Handle for the Control Panel Window
154  *  command [I] CPL_* Command
155  *  lParam1 [I] first extra Parameter
156  *  lParam2 [I] second extra Parameter
157  *
158  * RETURNS
159  *  Depends on the command
160  *
161  */
162 LONG CALLBACK CPlApplet(HWND hWnd, UINT command, LPARAM lParam1, LPARAM lParam2)
163 {
164     TRACE("(%p, %u, 0x%lx, 0x%lx)\n", hWnd, command, lParam1, lParam2);
165 
166     switch (command)
167     {
168         case CPL_INIT:
169             return TRUE;
170 
171         case CPL_GETCOUNT:
172             return 1;
173 
174         case CPL_INQUIRE:
175         {
176             CPLINFO *appletInfo = (CPLINFO *) lParam2;
177 
178             appletInfo->idIcon = ICO_MAIN;
179             appletInfo->idName = IDS_CPL_NAME;
180             appletInfo->idInfo = IDS_CPL_INFO;
181             appletInfo->lData = 0;
182             return TRUE;
183         }
184 
185         case CPL_DBLCLK:
186             display_cpl_sheets(hWnd);
187             break;
188     }
189 
190     return FALSE;
191 }
192 
193 /*********************************************************************
194  * LaunchInternetControlPanel (inetcpl.@)
195  *
196  * Launch the Internet Control Panel dialog
197  *
198  * PARAMS
199  *  parent  [I] Handle for the parent window
200  *
201  * RETURNS
202  *  Success: TRUE
203  *
204  * NOTES
205  *  rundll32 callable function: rundll32 inetcpl.cpl,LaunchInternetControlPanel
206  *
207  */
208 BOOL WINAPI LaunchInternetControlPanel(HWND parent)
209 {
210     display_cpl_sheets(parent);
211     return TRUE;
212 }
213 
214 /*********************************************************************
215  * LaunchConnectionDialog (inetcpl.@)
216  *
217  */
218 BOOL WINAPI LaunchConnectionDialog(HWND hParent)
219 {
220     FIXME("(%p): stub\n", hParent);
221     return FALSE;
222 }
223 
224 /*********************************************************************
225  * LaunchInternetControlPanel (inetcpl.@)
226  *
227  */
228 BOOL WINAPI LaunchPrivacyDialog(HWND hParent)
229 {
230     FIXME("(%p): stub\n", hParent);
231     return FALSE;
232 }
233 

~ [ 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.