// SiaDriveDlg.h : header file // #pragma once #include #include "SiaDriveConfig.h" using namespace Sia::Api; // CSiaDriveDlg dialog class CSiaDriveDlg : public CDHtmlDialog { // Construction public: CSiaDriveDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data #ifdef AFX_DESIGN_TIME enum { IDD = IDD_SIADRIVE_DIALOG, IDH = IDR_HTML_SIADRIVE_DIALOG }; #endif protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support HRESULT OnButtonOK(IHTMLElement *pElement); HRESULT OnButtonCancel(IHTMLElement *pElement); // Implementation protected: HICON m_hIcon; // Generated message map functions virtual BOOL OnInitDialog(); virtual void OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnTimer(UINT_PTR nIDEvent); DECLARE_MESSAGE_MAP() DECLARE_DHTML_EVENT_MAP() virtual HRESULT WINAPI TranslateAccelerator(MSG *message, const GUID *, DWORD) override; virtual BOOL PreTranslateMessage(MSG* pMsg) override; private: void DisplayCreateWallet(); void DisplayWalletTab(); bool DisplaySiaInfo(); bool UpdateUi(const bool& refresh = true); HRESULT GetDomElementById(const CString& id, CComPtr& node); HRESULT GetDomElementAndNodeById(const CString& id, CComPtr& node, CComPtr& elem); private: CSiaDriveConfig _siaConfig; CSiaApi _siaApi; CString _serverVersion; CString _clientVersion; CString _walletBalanceTotal; CString _walletBalanceConfirmed; CString _walletBalanceUnconfirmed; bool _connected = false; static const UINT IDT_UPDATE = 1; static const std::uint8_t WALLET_TAB = 0; };