ReactOS 0.4.16-dev-91-g764881a
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}
HWND hWnd
Definition: settings.c:17
#define CPL_INQUIRE
Definition: cpl.h:14
#define CPL_DBLCLK
Definition: cpl.h:16
#define CPL_INIT
Definition: cpl.h:12
#define CPL_GETCOUNT
Definition: cpl.h:13
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static void display_cpl_sheets(HWND parent)
Definition: inetcpl.c:108
#define IDS_CPL_INFO
Definition: inetcpl.h:50
#define IDS_CPL_NAME
Definition: inetcpl.h:49
#define ICO_MAIN
Definition: inetcpl.h:38
#define TRACE(s)
Definition: solgame.cpp:4
Definition: cpl.h:24
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25

◆ display_cpl_sheets()

static void display_cpl_sheets ( HWND  parent)
static

Definition at line 108 of file inetcpl.c.

109{
113 DWORD id = 0;
114
116 /* Initialize common controls */
117 icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
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
164}
#define IDD_GENERAL
Definition: resource.h:12
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:900
INT_PTR CALLBACK connections_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: connections.c:349
INT_PTR CALLBACK content_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: content.c:78
#define NULL
Definition: types.h:112
INT_PTR CALLBACK general_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: general.c:298
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2916
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
Definition: ole2.c:169
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
Definition: ole2.c:230
r parent
Definition: btrfs.c:3010
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint id
Definition: glext.h:5910
DECLSPEC_HIDDEN HMODULE hcpl
Definition: inetcpl.c:42
static int CALLBACK propsheet_callback(HWND hwnd, UINT msg, LPARAM lparam)
Definition: inetcpl.c:78
#define IDD_SECURITY
Definition: inetcpl.h:83
#define IDD_CONNECTIONS
Definition: inetcpl.h:95
#define NUM_PROPERTY_PAGES
Definition: inetcpl.h:35
INT_PTR CALLBACK security_dlgproc(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN
Definition: security.c:412
#define IDD_CONTENT
Definition: inetcpl.h:91
#define PSH_USECALLBACK
Definition: prsht.h:48
struct _PROPSHEETPAGEW PROPSHEETPAGEW
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
#define PSH_USEICONID
Definition: prsht.h:42
struct _PROPSHEETHEADERW PROPSHEETHEADERW
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
#define ICC_BAR_CLASSES
Definition: commctrl.h:60
#define ICC_LISTVIEW_CLASSES
Definition: commctrl.h:58
LPCPROPSHEETPAGEW ppsp
Definition: prsht.h:308
HINSTANCE hInstance
Definition: prsht.h:296
DWORD dwSize
Definition: prsht.h:293
DWORD dwFlags
Definition: prsht.h:294
LPCWSTR pszIcon
Definition: prsht.h:299
HWND hwndParent
Definition: prsht.h:295
PFNPROPSHEETCALLBACK pfnCallback
Definition: prsht.h:311
LPCWSTR pszCaption
Definition: prsht.h:301
DLGPROC pfnDlgProc
Definition: prsht.h:226
DWORD dwSize
Definition: prsht.h:214
LPCWSTR pszTemplate
Definition: prsht.h:218
HINSTANCE hInstance
Definition: prsht.h:216
#define ZeroMemory
Definition: winbase.h:1712
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

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}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define S_OK
Definition: intsafe.h:52
#define debugstr_w
Definition: kernel32.h:32
TCHAR * cmdline
Definition: stretchblt.cpp:32

◆ 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
60 hcpl = hdll;
61 }
62 return TRUE;
63}
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
r reserved
Definition: btrfs.c:3006
static PVOID hdll
Definition: shimdbg.c:126

◆ 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}

◆ LaunchInternetControlPanel()

BOOL WINAPI LaunchInternetControlPanel ( HWND  parent)

Definition at line 227 of file inetcpl.c.

228{
230 return TRUE;
231}

◆ 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}

◆ 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.
83#endif
84 TRACE("(%p, 0x%08x/%d, 0x%lx)\n", hwnd, msg, msg, lparam);
85 switch (msg)
86 {
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}
@ lparam
Definition: SystemMenu.c:31
#define msg(x)
Definition: auth_time.c:54
static HICON
Definition: imagelist.c:80
HICON hIcon
Definition: msconfig.c:44
#define PSCB_INITIALIZED
Definition: prsht.h:75
#define ICON_BIG
Definition: tnclass.cpp:51
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2119
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by display_cpl_sheets().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( inetcpl  )

Variable Documentation

◆ hcpl