Commit 3f687ffa authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

cryptui: Add a (empty) select store dialog.

parent b378419a
......@@ -183,3 +183,16 @@ BEGIN
PUSHBUTTON "OK", IDOK, 33,48,60,14
PUSHBUTTON "Cancel", IDCANCEL, 100,48,60,14
END
IDD_SELECT_STORE DIALOG DISCARDABLE 0,0,200,136
CAPTION "Select Certificate Store"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Select the certificate store you want to use:", IDC_STORE_TEXT, 6,6,190,28
CONTROL "",IDC_STORE_LIST, "SysTreeView32", TVS_HASLINES|WS_BORDER|WS_TABSTOP,
6,28,188,70
CHECKBOX "&Show physical stores", IDC_SHOW_PHYSICAL_STORES, 6,102,90,14,
BS_AUTOCHECKBOX|WS_TABSTOP
PUSHBUTTON "OK", IDOK, 90,118,50,14, BS_DEFPUSHBUTTON
PUSHBUTTON "Cancel", IDCANCEL, 144,118,50,14
END
......@@ -92,6 +92,7 @@
#define IDD_USERNOTICE 103
#define IDD_CERT_PROPERTIES_GENERAL 104
#define IDD_ADD_CERT_PURPOSE 105
#define IDD_SELECT_STORE 106
#define IDB_SMALL_ICONS 200
#define IDB_CERT 201
......@@ -131,4 +132,8 @@
#define IDC_NEW_PURPOSE 2500
#define IDC_STORE_TEXT 2600
#define IDC_STORE_LIST 2601
#define IDC_SHOW_PHYSICAL_STORES 2602
#endif /* ndef __CRYPTUIRES_H_ */
......@@ -118,12 +118,59 @@ typedef struct _CRYPTUI_SELECTSTORE_INFO_W
void *pvArg;
} CRYPTUI_SELECTSTORE_INFO_W, *PCRYPTUI_SELECTSTORE_INFO_W;
static LRESULT CALLBACK select_store_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
LPARAM lp)
{
PCRYPTUI_SELECTSTORE_INFO_W info;
LRESULT ret = 0;
switch (msg)
{
case WM_INITDIALOG:
{
info = (PCRYPTUI_SELECTSTORE_INFO_W)lp;
SetWindowLongPtrW(hwnd, DWLP_USER, lp);
if (info->pwszTitle)
SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)info->pwszTitle);
if (info->pwszText)
SendMessageW(GetDlgItem(hwnd, IDC_STORE_TEXT), WM_SETTEXT, 0,
(LPARAM)info->pwszText);
if (!(info->dwFlags & CRYPTUI_ENABLE_SHOW_PHYSICAL_STORE))
ShowWindow(GetDlgItem(hwnd, IDC_SHOW_PHYSICAL_STORES), FALSE);
break;
}
case WM_COMMAND:
switch (wp)
{
case IDOK:
EndDialog(hwnd, IDOK);
ret = TRUE;
break;
case IDCANCEL:
EndDialog(hwnd, IDCANCEL);
ret = TRUE;
break;
}
break;
}
return ret;
}
/***********************************************************************
* CryptUIDlgSelectStoreW (CRYPTUI.@)
*/
HCERTSTORE WINAPI CryptUIDlgSelectStoreW(PCRYPTUI_SELECTSTORE_INFO_W info)
{
FIXME("(%p): stub\n", info);
TRACE("(%p)\n", info);
if (info->dwSize != sizeof(CRYPTUI_SELECTSTORE_INFO_W))
{
WARN("unexpected size %d\n", info->dwSize);
SetLastError(E_INVALIDARG);
return NULL;
}
DialogBoxParamW(hInstance, MAKEINTRESOURCEW(IDD_SELECT_STORE), info->parent,
select_store_dlg_proc, (LPARAM)info);
return NULL;
}
......
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