2 * Internet control panel applet: content propsheet
4 * Copyright 2010 Detlef Riekenberg
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.
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.
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
22 #define NONAMELESSUNION
23 #define WIN32_NO_STATUS
29 #include <cryptuiapi.h>
32 #include <wine/debug.h>
34 WINE_DEFAULT_DEBUG_CHANNEL(inetcpl
);
36 /*********************************************************************
37 * display_cert_manager (internal)
39 * call cryptui to display a specific certificate manager dialog
42 static BOOL
display_cert_manager(HWND parent
, DWORD flags
)
44 CRYPTUI_CERT_MGR_STRUCT dlg
;
46 TRACE("(%p, 0x%x)\n", parent
, flags
);
48 ZeroMemory(&dlg
, sizeof(CRYPTUI_CERT_MGR_STRUCT
));
49 dlg
.dwSize
= sizeof(CRYPTUI_CERT_MGR_STRUCT
);
50 dlg
.hwndParent
= parent
;
53 return CryptUIDlgCertMgr(&dlg
);
56 /*********************************************************************
57 * LaunchSiteCertDialog (inetcpl.@)
59 * Launch a dialog to manage personal certificates
62 * parent [I] Handle for the parent window
69 * rundll32 callable function: rundll32 inetcpl.cpl,LaunchSiteCertDialog
72 BOOL WINAPI
LaunchSiteCertDialog(HWND parent
)
74 return display_cert_manager(parent
, 0);
77 /*********************************************************************
78 * content_dlgproc [internal]
81 INT_PTR CALLBACK
content_dlgproc(HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
)
83 if ((msg
!= WM_SETCURSOR
) && (msg
!= WM_NCHITTEST
) && (msg
!= WM_MOUSEMOVE
))
84 TRACE("(%p, 0x%08x/%d, 0x%lx, 0x%lx)\n", hwnd
, msg
, msg
, wparam
, lparam
);
86 if (msg
== WM_COMMAND
)
88 switch (LOWORD(wparam
))
91 display_cert_manager(hwnd
, 0);
94 case IDC_CERT_PUBLISHER
:
95 display_cert_manager(hwnd
, CRYPTUI_CERT_MGR_PUBLISHER_TAB
);