mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[CRYPTUI] Let image list be automatically deleted (#5891)
Based on KRosUser's cryptui.patch. - Don't delete the image list because the list view will delete the image list automatically. CORE-17290
This commit is contained in:
parent
24757e30e9
commit
3faa56d2c7
1 changed files with 29 additions and 0 deletions
|
@ -789,11 +789,15 @@ static LRESULT CALLBACK cert_mgr_advanced_dlg_proc(HWND hwnd, UINT msg,
|
|||
{
|
||||
case IDOK:
|
||||
save_cert_mgr_usages(hwnd);
|
||||
#ifndef __REACTOS__
|
||||
ImageList_Destroy((HIMAGELIST)GetWindowLongPtrW(hwnd, DWLP_USER));
|
||||
#endif
|
||||
EndDialog(hwnd, IDOK);
|
||||
break;
|
||||
case IDCANCEL:
|
||||
#ifndef __REACTOS__
|
||||
ImageList_Destroy((HIMAGELIST)GetWindowLongPtrW(hwnd, DWLP_USER));
|
||||
#endif
|
||||
EndDialog(hwnd, IDCANCEL);
|
||||
break;
|
||||
}
|
||||
|
@ -1153,6 +1157,14 @@ static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
|
|||
show_store_certs(hwnd, cert_mgr_index_to_store(tab, 0));
|
||||
break;
|
||||
}
|
||||
#ifdef __REACTOS__
|
||||
case WM_DESTROY:
|
||||
free_certs(GetDlgItem(hwnd, IDC_MGR_CERTS));
|
||||
close_stores(GetDlgItem(hwnd, IDC_MGR_STORES));
|
||||
data = (struct CertMgrData *)GetWindowLongPtrW(hwnd, DWLP_USER);
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
break;
|
||||
#endif
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
NMHDR *hdr = (NMHDR *)lp;
|
||||
|
@ -1278,11 +1290,13 @@ static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
|
|||
cert_mgr_do_remove(hwnd);
|
||||
break;
|
||||
case IDCANCEL:
|
||||
#ifndef __REACTOS__
|
||||
free_certs(GetDlgItem(hwnd, IDC_MGR_CERTS));
|
||||
close_stores(GetDlgItem(hwnd, IDC_MGR_STORES));
|
||||
data = (struct CertMgrData *)GetWindowLongPtrW(hwnd, DWLP_USER);
|
||||
ImageList_Destroy(data->imageList);
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
#endif
|
||||
EndDialog(hwnd, IDCANCEL);
|
||||
break;
|
||||
}
|
||||
|
@ -3717,7 +3731,9 @@ static UINT CALLBACK cert_properties_general_callback(HWND hwnd, UINT msg,
|
|||
data = (struct edit_cert_data *)GetWindowLongPtrW(hwnd, DWLP_USER);
|
||||
if (data)
|
||||
{
|
||||
#ifndef __REACTOS__
|
||||
ImageList_Destroy(data->imageList);
|
||||
#endif
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
}
|
||||
break;
|
||||
|
@ -4219,7 +4235,9 @@ static UINT CALLBACK hierarchy_callback(HWND hwnd, UINT msg,
|
|||
{
|
||||
case PSPCB_RELEASE:
|
||||
data = (struct hierarchy_data *)page->lParam;
|
||||
#ifndef __REACTOS__
|
||||
ImageList_Destroy(data->imageList);
|
||||
#endif
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
break;
|
||||
}
|
||||
|
@ -7321,6 +7339,13 @@ static LRESULT CALLBACK select_cert_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPA
|
|||
select_cert_update_view_button(hwnd);
|
||||
break;
|
||||
}
|
||||
#ifdef __REACTOS__
|
||||
case WM_DESTROY:
|
||||
free_certs(GetDlgItem(hwnd, IDC_SELECT_CERTS));
|
||||
data = (struct SelectCertData *)GetWindowLongPtrW(hwnd, DWLP_USER);
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
break;
|
||||
#endif
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
NMHDR *hdr = (NMHDR *)lp;
|
||||
|
@ -7378,17 +7403,21 @@ static LRESULT CALLBACK select_cert_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPA
|
|||
break;
|
||||
}
|
||||
*data->cert = CertDuplicateCertificateContext(cert);
|
||||
#ifndef __REACTOS__
|
||||
free_certs(GetDlgItem(hwnd, IDC_SELECT_CERTS));
|
||||
ImageList_Destroy(data->imageList);
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
#endif
|
||||
EndDialog(hwnd, IDOK);
|
||||
break;
|
||||
}
|
||||
case IDCANCEL:
|
||||
#ifndef __REACTOS__
|
||||
data = (struct SelectCertData *)GetWindowLongPtrW(hwnd, DWLP_USER);
|
||||
free_certs(GetDlgItem(hwnd, IDC_SELECT_CERTS));
|
||||
ImageList_Destroy(data->imageList);
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
#endif
|
||||
EndDialog(hwnd, IDCANCEL);
|
||||
break;
|
||||
case IDC_SELECT_VIEW_CERT:
|
||||
|
|
Loading…
Reference in a new issue