ReactOS  0.4.15-dev-489-g75a0787
inetcpl.c File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include <commctrl.h>
#include <cpl.h>
#include "ole2.h"
#include "wine/debug.h"
#include "inetcpl.h"
Include dependency graph for inetcpl.c:

Go to the source code of this file.

Macros

#define NONAMELESSUNION
 
#define COBJMACROS
 
#define CONST_VTABLE
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (inetcpl)
 
BOOL WINAPI DllMain (HINSTANCE hdll, DWORD reason, LPVOID reserved)
 
HRESULT WINAPI DllInstall (BOOL bInstall, LPCWSTR cmdline)
 
static int CALLBACK propsheet_callback (HWND hwnd, UINT msg, LPARAM lparam)
 
static void display_cpl_sheets (HWND parent)
 
LONG CALLBACK CPlApplet (HWND hWnd, UINT command, LPARAM lParam1, LPARAM lParam2)
 
BOOL WINAPI LaunchInternetControlPanel (HWND parent)
 
BOOL WINAPI LaunchConnectionDialog (HWND hParent)
 
BOOL WINAPI LaunchPrivacyDialog (HWND hParent)
 

Variables

DECLSPEC_HIDDEN HMODULE hcpl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 23 of file inetcpl.c.

◆ CONST_VTABLE

#define CONST_VTABLE

Definition at line 24 of file inetcpl.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 22 of file inetcpl.c.

Function Documentation

◆ CPlApplet()

LONG CALLBACK CPlApplet ( HWND  hWnd,
UINT  command,
LPARAM  lParam1,
LPARAM  lParam2 
)

Definition at line 181 of file inetcpl.c.

182 {
183  TRACE("(%p, %u, 0x%lx, 0x%lx)\n", hWnd, command, lParam1, lParam2);
184 
185  switch (command)
186  {
187  case CPL_INIT:
188  return TRUE;
189 
190  case CPL_GETCOUNT:
191  return 1;
192 
193  case CPL_INQUIRE:
194  {
195  CPLINFO *appletInfo = (CPLINFO *) lParam2;
196 
197  appletInfo->idIcon = ICO_MAIN;
198  appletInfo->idName = IDS_CPL_NAME;
199  appletInfo->idInfo = IDS_CPL_INFO;
200  appletInfo->lData = 0;
201  return TRUE;
202  }
203 
204  case CPL_DBLCLK:
206  break;
207  }
208 
209  return FALSE;
210 }
#define TRUE
Definition: types.h:120
Definition: cpl.h:24
HWND hWnd
Definition: settings.c:17
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25
#define CPL_DBLCLK
Definition: cpl.h:16
#define ICO_MAIN
Definition: inetcpl.h:38
#define TRACE(s)
Definition: solgame.cpp:4
#define IDS_CPL_NAME
Definition: inetcpl.h:49
#define CPL_INIT
Definition: cpl.h:12
#define CPL_INQUIRE
Definition: cpl.h:14
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
static void display_cpl_sheets(HWND parent)
Definition: inetcpl.c:108
#define IDS_CPL_INFO
Definition: inetcpl.h:50
#define CPL_GETCOUNT
Definition: cpl.h:13

◆ display_cpl_sheets()

static void display_cpl_sheets ( HWND  parent)
static

Definition at line 108 of file inetcpl.c.

109 {
112  PROPSHEETHEADERW psh;
113  DWORD id = 0;
114 
116  /* Initialize common controls */
117  icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
119  InitCommonControlsEx(&icex);
120 
121  ZeroMemory(&psh, sizeof(psh));
122  ZeroMemory(psp, sizeof(psp));
123 
124  /* Fill out all PROPSHEETPAGE */
125  psp[id].dwSize = sizeof (PROPSHEETPAGEW);
126  psp[id].hInstance = hcpl;
129  id++;
130 
131  psp[id].dwSize = sizeof (PROPSHEETPAGEW);
132  psp[id].hInstance = hcpl;
135  id++;
136 
137  psp[id].dwSize = sizeof (PROPSHEETPAGEW);
138  psp[id].hInstance = hcpl;
141  id++;
142 
143  psp[id].dwSize = sizeof (PROPSHEETPAGEW);
144  psp[id].hInstance = hcpl;
147  id++;
148 
149  /* Fill out the PROPSHEETHEADER */
150  psh.dwSize = sizeof (PROPSHEETHEADERW);
152  psh.hwndParent = parent;
153  psh.hInstance = hcpl;
156  psh.nPages = id;
157  psh.u3.ppsp = psp;
159 
160  /* display the dialog */
161  PropertySheetW(&psh);
162 
163  OleUninitialize();
164 }
HWND hwndParent
Definition: prsht.h:295
LPCPROPSHEETPAGEW ppsp
Definition: prsht.h:308
LPCWSTR pszTemplate
Definition: prsht.h:218
INT_PTR CALLBACK security_dlgproc(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN
Definition: security.c:410
#define IDD_CONNECTIONS
Definition: inetcpl.h:95
#define IDD_GENERAL
Definition: resource.h:12
#define ZeroMemory
Definition: winbase.h:1648
struct _PROPSHEETHEADERW PROPSHEETHEADERW
#define PSH_USECALLBACK
Definition: prsht.h:48
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
DWORD dwSize
Definition: prsht.h:214
#define PSH_USEICONID
Definition: prsht.h:42
#define ICO_MAIN
Definition: inetcpl.h:38
LPCWSTR pszCaption
Definition: prsht.h:301
DLGPROC pfnDlgProc
Definition: prsht.h:226
PFNPROPSHEETCALLBACK pfnCallback
Definition: prsht.h:311
struct _PROPSHEETPAGEW PROPSHEETPAGEW
smooth NULL
Definition: ftsmooth.c:416
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2905
#define IDD_SECURITY
Definition: inetcpl.h:83
#define NUM_PROPERTY_PAGES
Definition: inetcpl.h:35
#define IDD_CONTENT
Definition: inetcpl.h:91
#define ICC_BAR_CLASSES
Definition: commctrl.h:60
INT_PTR CALLBACK connections_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: connections.c:349
r parent
Definition: btrfs.c:2944
HINSTANCE hInstance
Definition: prsht.h:296
#define IDS_CPL_NAME
Definition: inetcpl.h:49
LPCWSTR pszIcon
Definition: prsht.h:299
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dwSize
Definition: prsht.h:293
DWORD dwFlags
Definition: prsht.h:294
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
HINSTANCE hInstance
Definition: prsht.h:216
INT_PTR CALLBACK content_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: content.c:78
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
Definition: ole2.c:169
#define ICC_LISTVIEW_CLASSES
Definition: commctrl.h:58
static int CALLBACK propsheet_callback(HWND hwnd, UINT msg, LPARAM lparam)
Definition: inetcpl.c:78
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
INT_PTR CALLBACK general_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: general.c:298
GLenum GLuint id
Definition: glext.h:5579
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
Definition: ole2.c:230
DECLSPEC_HIDDEN HMODULE hcpl
Definition: inetcpl.c:42

Referenced by CPlApplet(), and LaunchInternetControlPanel().

◆ DllInstall()

HRESULT WINAPI DllInstall ( BOOL  bInstall,
LPCWSTR  cmdline 
)

Definition at line 68 of file inetcpl.c.

69 {
70  FIXME("(%s, %s): stub\n", bInstall ? "TRUE" : "FALSE", debugstr_w(cmdline));
71  return S_OK;
72 }
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:59

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hdll,
DWORD  reason,
LPVOID  reserved 
)

Definition at line 47 of file inetcpl.c.

48 {
49  TRACE("(%p, %d, %p)\n", hdll, reason, reserved);
50 
51  switch (reason)
52  {
53 #ifndef __REACTOS__
54  case DLL_WINE_PREATTACH:
55  return FALSE; /* prefer native version */
56 #endif
57 
58  case DLL_PROCESS_ATTACH:
60  hcpl = hdll;
61  }
62  return TRUE;
63 }
#define TRUE
Definition: types.h:120
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
r reserved
Definition: btrfs.c:2940
#define TRACE(s)
Definition: solgame.cpp:4
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
static PVOID hdll
Definition: shimdbg.c:126
DECLSPEC_HIDDEN HMODULE hcpl
Definition: inetcpl.c:42

◆ LaunchConnectionDialog()

BOOL WINAPI LaunchConnectionDialog ( HWND  hParent)

Definition at line 237 of file inetcpl.c.

238 {
239  FIXME("(%p): stub\n", hParent);
240  return FALSE;
241 }
#define FIXME(fmt,...)
Definition: debug.h:111
const DOCKBAR PVOID HWND hParent
Definition: tooldock.h:22

◆ LaunchInternetControlPanel()

BOOL WINAPI LaunchInternetControlPanel ( HWND  parent)

Definition at line 227 of file inetcpl.c.

228 {
230  return TRUE;
231 }
#define TRUE
Definition: types.h:120
r parent
Definition: btrfs.c:2944
static void display_cpl_sheets(HWND parent)
Definition: inetcpl.c:108

◆ LaunchPrivacyDialog()

BOOL WINAPI LaunchPrivacyDialog ( HWND  hParent)

Definition at line 247 of file inetcpl.c.

248 {
249  FIXME("(%p): stub\n", hParent);
250  return FALSE;
251 }
#define FIXME(fmt,...)
Definition: debug.h:111
const DOCKBAR PVOID HWND hParent
Definition: tooldock.h:22

◆ propsheet_callback()

static int CALLBACK propsheet_callback ( HWND  hwnd,
UINT  msg,
LPARAM  lparam 
)
static

Definition at line 78 of file inetcpl.c.

79 {
80 #ifdef __REACTOS__
81  // NOTE: This callback is needed to set large icon correctly.
82  HICON hIcon;
83 #endif
84  TRACE("(%p, 0x%08x/%d, 0x%lx)\n", hwnd, msg, msg, lparam);
85  switch (msg)
86  {
87  case PSCB_INITIALIZED:
88 #ifdef __REACTOS__
89  {
91  SendMessageW(hwnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
92  break;
93  }
94 #else
96  break;
97 #endif
98  }
99  return 0;
100 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static HICON
Definition: imagelist.c:84
#define ICO_MAIN
Definition: inetcpl.h:38
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
#define PSCB_INITIALIZED
Definition: prsht.h:75
HICON hIcon
Definition: msconfig.c:44
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define msg(x)
Definition: auth_time.c:54
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define ICON_BIG
Definition: tnclass.cpp:51
DECLSPEC_HIDDEN HMODULE hcpl
Definition: inetcpl.c:42

Referenced by display_cpl_sheets().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( inetcpl  )

Variable Documentation

◆ hcpl