Commit e7e91402 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

cryptui: Refresh cert view when purpose selection is changed in the certificate manager dialog.

parent 73a8f894
...@@ -636,8 +636,33 @@ static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, ...@@ -636,8 +636,33 @@ static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
refresh_store_certs(hwnd); refresh_store_certs(hwnd);
break; break;
case IDC_MGR_ADVANCED: case IDC_MGR_ADVANCED:
DialogBoxW(hInstance, MAKEINTRESOURCEW(IDD_CERT_MGR_ADVANCED), hwnd, if (DialogBoxW(hInstance, MAKEINTRESOURCEW(IDD_CERT_MGR_ADVANCED),
cert_mgr_advanced_dlg_proc); hwnd, cert_mgr_advanced_dlg_proc) == IDOK)
{
HWND cb = GetDlgItem(hwnd, IDC_MGR_PURPOSE_SELECTION);
int index, len;
LPWSTR curString = NULL;
index = SendMessageW(cb, CB_GETCURSEL, 0, 0);
if (index >= 0)
{
len = SendMessageW(cb, CB_GETLBTEXTLEN, index, 0);
curString = HeapAlloc(GetProcessHeap(), 0,
(len + 1) * sizeof(WCHAR));
SendMessageW(cb, CB_GETLBTEXT, index, (LPARAM)curString);
}
SendMessageW(cb, CB_RESETCONTENT, 0, 0);
initialize_purpose_selection(hwnd);
if (curString)
{
index = SendMessageW(cb, CB_FINDSTRINGEXACT, -1,
(LPARAM)curString);
if (index >= 0)
SendMessageW(cb, CB_SETCURSEL, index, 0);
HeapFree(GetProcessHeap(), 0, curString);
}
refresh_store_certs(hwnd);
}
break; break;
case IDCANCEL: case IDCANCEL:
free_certs(GetDlgItem(hwnd, IDC_MGR_CERTS)); free_certs(GetDlgItem(hwnd, IDC_MGR_CERTS));
......
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