cryptui: Add a (empty) details page to the cert properties dialog.
This commit is contained in:
parent
e7490ad082
commit
b7afe1740b
|
@ -82,6 +82,23 @@ BEGIN
|
||||||
PUSHBUTTON "Issuer &Statement", IDC_ISSUERSTATEMENT,177,216,70,14
|
PUSHBUTTON "Issuer &Statement", IDC_ISSUERSTATEMENT,177,216,70,14
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_DETAIL DIALOG DISCARDABLE 0, 0, 255, 236
|
||||||
|
CAPTION "Details"
|
||||||
|
STYLE WS_VISIBLE
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
BEGIN
|
||||||
|
LTEXT "&Show:", stc1, 6,12,40,14
|
||||||
|
COMBOBOX IDC_DETAIL_SELECT, 28,10,100,14,
|
||||||
|
CBS_DROPDOWNLIST|WS_BORDER|WS_VSCROLL|WS_TABSTOP
|
||||||
|
CONTROL "", IDC_DETAIL_LIST, "SysListView32",
|
||||||
|
LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER,
|
||||||
|
6,28,241,100
|
||||||
|
CONTROL "", IDC_DETAIL_VALUE, "RichEdit20W",
|
||||||
|
ES_READONLY|ES_MULTILINE|WS_TABSTOP, 6,136,241,70
|
||||||
|
PUSHBUTTON "&Edit Properties...", IDC_EDITPROPERTIES,103,216,70,14
|
||||||
|
PUSHBUTTON "&Copy to File...", IDC_EXPORT,177,216,70,14
|
||||||
|
END
|
||||||
|
|
||||||
IDD_USERNOTICE DIALOG DISCARDABLE 0, 0, 255, 256
|
IDD_USERNOTICE DIALOG DISCARDABLE 0, 0, 255, 256
|
||||||
CAPTION "Disclaimer"
|
CAPTION "Disclaimer"
|
||||||
STYLE WS_VISIBLE
|
STYLE WS_VISIBLE
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
#define IDS_PURPOSE_DS_EMAIL_REPLICATION 1125
|
#define IDS_PURPOSE_DS_EMAIL_REPLICATION 1125
|
||||||
|
|
||||||
#define IDD_GENERAL 100
|
#define IDD_GENERAL 100
|
||||||
|
#define IDD_DETAIL 101
|
||||||
#define IDD_USERNOTICE 103
|
#define IDD_USERNOTICE 103
|
||||||
|
|
||||||
#define IDB_CERT 201
|
#define IDB_CERT 201
|
||||||
|
@ -75,6 +76,12 @@
|
||||||
#define IDC_ADDTOSTORE 2005
|
#define IDC_ADDTOSTORE 2005
|
||||||
#define IDC_ISSUERSTATEMENT 2006
|
#define IDC_ISSUERSTATEMENT 2006
|
||||||
|
|
||||||
|
#define IDC_DETAIL_SELECT 2100
|
||||||
|
#define IDC_DETAIL_LIST 2101
|
||||||
|
#define IDC_DETAIL_VALUE 2102
|
||||||
|
#define IDC_EDITPROPERTIES 2103
|
||||||
|
#define IDC_EXPORT 2104
|
||||||
|
|
||||||
#define IDC_USERNOTICE 2300
|
#define IDC_USERNOTICE 2300
|
||||||
#define IDC_CPS 2301
|
#define IDC_CPS 2301
|
||||||
|
|
||||||
|
|
|
@ -1001,6 +1001,70 @@ static void init_general_page(PCCRYPTUI_VIEWCERTIFICATE_STRUCTW pCertViewInfo,
|
||||||
page->lParam = (LPARAM)pCertViewInfo;
|
page->lParam = (LPARAM)pCertViewInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct detail_data
|
||||||
|
{
|
||||||
|
PCCRYPTUI_VIEWCERTIFICATE_STRUCTW pCertViewInfo;
|
||||||
|
BOOL *pfPropertiesChanged;
|
||||||
|
};
|
||||||
|
|
||||||
|
static LRESULT CALLBACK detail_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
|
||||||
|
LPARAM lp)
|
||||||
|
{
|
||||||
|
PROPSHEETPAGEW *page;
|
||||||
|
struct detail_data *data;
|
||||||
|
|
||||||
|
TRACE("(%p, %08x, %08lx, %08lx)\n", hwnd, msg, wp, lp);
|
||||||
|
|
||||||
|
switch (msg)
|
||||||
|
{
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
page = (PROPSHEETPAGEW *)lp;
|
||||||
|
data = (struct detail_data *)page->lParam;
|
||||||
|
FIXME("add cert details\n");
|
||||||
|
if (!(data->pCertViewInfo->dwFlags & CRYPTUI_ENABLE_EDITPROPERTIES))
|
||||||
|
EnableWindow(GetDlgItem(hwnd, IDC_EDITPROPERTIES), FALSE);
|
||||||
|
if (data->pCertViewInfo->dwFlags & CRYPTUI_DISABLE_EXPORT)
|
||||||
|
EnableWindow(GetDlgItem(hwnd, IDC_EXPORT), FALSE);
|
||||||
|
break;
|
||||||
|
case WM_COMMAND:
|
||||||
|
switch (wp)
|
||||||
|
{
|
||||||
|
case IDC_EXPORT:
|
||||||
|
FIXME("call CryptUIWizExport\n");
|
||||||
|
break;
|
||||||
|
case IDC_EDITPROPERTIES:
|
||||||
|
FIXME("show edit properties dialog\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL init_detail_page(PCCRYPTUI_VIEWCERTIFICATE_STRUCTW pCertViewInfo,
|
||||||
|
BOOL *pfPropertiesChanged, PROPSHEETPAGEW *page)
|
||||||
|
{
|
||||||
|
BOOL ret;
|
||||||
|
struct detail_data *data = HeapAlloc(GetProcessHeap(), 0,
|
||||||
|
sizeof(struct detail_data));
|
||||||
|
|
||||||
|
if (data)
|
||||||
|
{
|
||||||
|
data->pCertViewInfo = pCertViewInfo;
|
||||||
|
data->pfPropertiesChanged = pfPropertiesChanged;
|
||||||
|
memset(page, 0, sizeof(PROPSHEETPAGEW));
|
||||||
|
page->dwSize = sizeof(PROPSHEETPAGEW);
|
||||||
|
page->hInstance = hInstance;
|
||||||
|
page->u.pszTemplate = MAKEINTRESOURCEW(IDD_DETAIL);
|
||||||
|
page->pfnDlgProc = detail_dlg_proc;
|
||||||
|
page->lParam = (LPARAM)data;
|
||||||
|
ret = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ret = FALSE;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static int CALLBACK cert_prop_sheet_proc(HWND hwnd, UINT msg, LPARAM lp)
|
static int CALLBACK cert_prop_sheet_proc(HWND hwnd, UINT msg, LPARAM lp)
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
@ -1040,7 +1104,7 @@ static BOOL show_cert_dialog(PCCRYPTUI_VIEWCERTIFICATE_STRUCTW pCertViewInfo,
|
||||||
|
|
||||||
nPages = pCertViewInfo->cPropSheetPages + 1; /* one for the General tab */
|
nPages = pCertViewInfo->cPropSheetPages + 1; /* one for the General tab */
|
||||||
if (!(pCertViewInfo->dwFlags & CRYPTUI_HIDE_DETAILPAGE))
|
if (!(pCertViewInfo->dwFlags & CRYPTUI_HIDE_DETAILPAGE))
|
||||||
FIXME("show detail page\n");
|
nPages++;
|
||||||
if (!(pCertViewInfo->dwFlags & CRYPTUI_HIDE_HIERARCHYPAGE))
|
if (!(pCertViewInfo->dwFlags & CRYPTUI_HIDE_HIERARCHYPAGE))
|
||||||
FIXME("show hierarchy page\n");
|
FIXME("show hierarchy page\n");
|
||||||
pages = HeapAlloc(GetProcessHeap(), 0, nPages * sizeof(PROPSHEETPAGEW));
|
pages = HeapAlloc(GetProcessHeap(), 0, nPages * sizeof(PROPSHEETPAGEW));
|
||||||
|
@ -1059,6 +1123,12 @@ static BOOL show_cert_dialog(PCCRYPTUI_VIEWCERTIFICATE_STRUCTW pCertViewInfo,
|
||||||
else
|
else
|
||||||
hdr.pszCaption = MAKEINTRESOURCEW(IDS_CERTIFICATE);
|
hdr.pszCaption = MAKEINTRESOURCEW(IDS_CERTIFICATE);
|
||||||
init_general_page(pCertViewInfo, &pages[hdr.nPages++]);
|
init_general_page(pCertViewInfo, &pages[hdr.nPages++]);
|
||||||
|
if (!(pCertViewInfo->dwFlags & CRYPTUI_HIDE_DETAILPAGE))
|
||||||
|
{
|
||||||
|
if (init_detail_page(pCertViewInfo, pfPropertiesChanged,
|
||||||
|
&pages[hdr.nPages]))
|
||||||
|
hdr.nPages++;
|
||||||
|
}
|
||||||
/* Copy each additional page, and create the init dialog struct for it
|
/* Copy each additional page, and create the init dialog struct for it
|
||||||
*/
|
*/
|
||||||
if (pCertViewInfo->cPropSheetPages)
|
if (pCertViewInfo->cPropSheetPages)
|
||||||
|
|
Loading…
Reference in New Issue