diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-02-18 13:04:55 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-02-18 13:04:55 +0000 |
commit | 22fa808cca12864de4a914e6f8de72b3cbcd46af (patch) | |
tree | 371fc3f9465efd1c424a0b0c099f454a93a773d4 /plugins/Db3x_mmap/src/ui.h | |
parent | 2868202cb6260735157346833a4cf6326772011d (diff) |
db3x_mmap: cryptoprovider select dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@16302 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/ui.h')
-rw-r--r-- | plugins/Db3x_mmap/src/ui.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/Db3x_mmap/src/ui.h b/plugins/Db3x_mmap/src/ui.h new file mode 100644 index 0000000000..b818b64adf --- /dev/null +++ b/plugins/Db3x_mmap/src/ui.h @@ -0,0 +1,37 @@ +
+
+class CSelectCryptoDialog : public CDlgBase
+{
+ CCtrlCombo m_combo;
+ CRYPTO_PROVIDER **m_provs;
+ size_t m_provscount;
+ CRYPTO_PROVIDER *m_selected;
+public:
+ CSelectCryptoDialog(CRYPTO_PROVIDER **provs, size_t count) :
+ CDlgBase(g_hInst, IDD_SELECT_CRYPTOPROVIDER),
+ m_combo(this, IDC_SELECTCRYPT_COMBO),
+ m_provs(provs),
+ m_provscount(count),
+ m_selected(nullptr)
+ {
+ }
+ void OnInitDialog()
+ {
+ for (size_t i = 0; i < m_provscount; i++)
+ {
+ CRYPTO_PROVIDER *prov = m_provs[i];
+ m_combo.AddStringA(prov->pszName, i);
+ }
+ m_combo.SetCurSel(0);
+ }
+ void OnClose()
+ {
+ m_selected = m_provs[ m_combo.GetItemData(m_combo.GetCurSel()) ];
+ }
+
+ inline CRYPTO_PROVIDER* GetSelected()
+ {
+ return m_selected;
+ }
+
+};
\ No newline at end of file |