#pragma once #include "afxwin.h" #include "etrade_edit_control.h" // PayDlg 对话框 class PayDlg : public CDialogEx { DECLARE_DYNAMIC(PayDlg) public: PayDlg(long statement_id, CString total_money, int card_type, CWnd* pParent = NULL); // 标准构造函数 virtual ~PayDlg(); // 对话框数据 enum { IDD = IDD_DIALOG_PAY }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 DECLARE_MESSAGE_MAP() public: virtual BOOL OnInitDialog(); afx_msg void OnBnClickedPayButtonClose(); afx_msg void OnBnClickedPayButtonPay(); afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); afx_msg LRESULT OnSessionExpired(WPARAM wParam, LPARAM lParam); afx_msg void OnBnClickedPayButtonPassword(); virtual BOOL PreTranslateMessage(MSG* pMsg); afx_msg void OnBnClickedEnter(); private: void SetCtrlPos(); void SetErrorMsg(CString error); private: CStatic total_money_static_; CStatic real_money_static_; CStatic password_static_; CEditBox password_edit_; CButton pay_button_; CButton close_button_; CButton password_button_; CStatic error_msg_static_; long statement_id_; CString total_money_; int card_type_; HACCEL acce_; };