Commit afe36a89 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

inetcpl: Add content property sheet.

parent 8f87459b
MODULE = inetcpl.cpl
IMPORTS = comctl32 user32
DELAYIMPORTS = cryptui
C_SRCS = \
......
......@@ -27,6 +27,7 @@
#include <winuser.h>
#include <cryptuiapi.h>
#include "inetcpl.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(inetcpl);
......@@ -57,7 +58,7 @@ static BOOL display_cert_manager(HWND parent, DWORD flags)
* Launch a dialog to manage personal certificates
*
* PARAMS
* hWnd [I] Handle for the parrent window
* parent [I] Handle for the parent window
*
* RETURNS
* Failure: FALSE
......@@ -71,3 +72,28 @@ BOOL WINAPI LaunchSiteCertDialog(HWND parent)
{
return display_cert_manager(parent, 0);
}
/*********************************************************************
* content_dlgproc [internal]
*
*/
INT_PTR CALLBACK content_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
TRACE("(%p, 0x%08x/%d, 0x%lx, 0x%lx)\n", hwnd, msg, msg, wparam, lparam);
if (msg == WM_COMMAND)
{
switch (LOWORD(wparam))
{
case IDC_CERT:
display_cert_manager(hwnd, 0);
break;
case IDC_CERT_PUBLISHER:
display_cert_manager(hwnd, CRYPTUI_CERT_MGR_PUBLISHER_TAB);
break;
}
}
return FALSE;
}
/*
* Internet control panel applet
* English resources for the Internet control panel applet
*
* Copyright 2010 Detlef Riekenberg
*
......@@ -28,3 +28,18 @@ BEGIN
IDS_CPL_NAME "Internet Settings"
IDS_CPL_INFO "Configure Wine Internet Browser and related settings"
END
/* "Content" propsheet */
IDD_CONTENT DIALOG 0, 0, 320, 220
STYLE WS_CAPTION | WS_CHILD | WS_DISABLED
FONT 8, "MS Shell Dlg"
CAPTION "Content"
BEGIN
GROUPBOX " Certificates ", IDC_STATIC, 4, 4, 312, 50
LTEXT "Certificates are used for your personal identification and to identify certificate authorities and publishers.",
IDC_STATIC, 58, 14, 252, 18
PUSHBUTTON "Certificates...", IDC_CERT, 146, 34, 80, 14
PUSHBUTTON "Publishers... ", IDC_CERT_PUBLISHER, 230, 34, 80, 14
END
......@@ -24,6 +24,10 @@
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include <commctrl.h>
#include <commdlg.h>
#include <cpl.h>
#include "wine/debug.h"
......@@ -33,6 +37,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(inetcpl);
HMODULE hcpl;
/*********************************************************************
* DllMain (inetcpl.@)
*/
......@@ -47,10 +53,65 @@ BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved)
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hdll);
hcpl = hdll;
}
return TRUE;
}
/******************************************************************************
* propsheet_callback [internal]
*
*/
static int CALLBACK propsheet_callback(HWND hwnd, UINT msg, LPARAM lparam)
{
TRACE("(%p, 0x%08x/%d, 0x%lx)\n", hwnd, msg, msg, lparam);
switch (msg)
{
case PSCB_INITIALIZED:
SendMessageW(hwnd, WM_SETICON, ICON_BIG, (LPARAM) LoadIconW(hcpl, MAKEINTRESOURCEW(ICO_MAIN)));
break;
}
return 0;
}
/******************************************************************************
* display_cpl_sheets [internal]
*
* Build and display the dialog with all control panel propertysheets
*
*/
static void display_cpl_sheets(HWND parent)
{
PROPSHEETPAGEW psp[NUM_PROPERTY_PAGES];
PROPSHEETHEADERW psh;
DWORD id = 0;
ZeroMemory(&psh, sizeof(psh));
ZeroMemory(psp, sizeof(psp));
/* Fill out all PROPSHEETPAGE */
psp[id].dwSize = sizeof (PROPSHEETPAGEW);
psp[id].hInstance = hcpl;
psp[id].u.pszTemplate = MAKEINTRESOURCEW(IDD_CONTENT);
psp[id].pfnDlgProc = content_dlgproc;
id++;
/* Fill out the PROPSHEETHEADER */
psh.dwSize = sizeof (PROPSHEETHEADERW);
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USEICONID | PSH_USECALLBACK;
psh.hwndParent = parent;
psh.hInstance = hcpl;
psh.u.pszIcon = MAKEINTRESOURCEW(ICO_MAIN);
psh.pszCaption = MAKEINTRESOURCEW(IDS_CPL_NAME);
psh.nPages = id;
psh.u3.ppsp = psp;
psh.pfnCallback = propsheet_callback;
/* display the dialog */
PropertySheetW(&psh);
}
/*********************************************************************
* CPlApplet (inetcpl.@)
*
......@@ -90,7 +151,7 @@ LONG CALLBACK CPlApplet(HWND hWnd, UINT command, LPARAM lParam1, LPARAM lParam2)
}
case CPL_DBLCLK:
FIXME("not implemented yet\n");
display_cpl_sheets(hWnd);
break;
}
......
......@@ -22,9 +22,22 @@
#include <windef.h>
#include <winuser.h>
extern HMODULE hcpl;
INT_PTR CALLBACK content_dlgproc(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN;
#define NUM_PROPERTY_PAGES 8
/* icons */
#define ICO_MAIN 100
/* strings */
#define IDS_CPL_NAME 1
#define IDS_CPL_INFO 2
/* dialogs */
#define IDC_STATIC -1
#define IDD_CONTENT 4000
#define IDC_CERT 4100
#define IDC_CERT_PUBLISHER 4101
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment