#pragma once // CDialogCommSet1 对话框 class CDialogCommSet1 : public CDialogEx { DECLARE_DYNAMIC(CDialogCommSet1) public: CDialogCommSet1(CWnd* pParent = nullptr); // 标准构造函数 virtual ~CDialogCommSet1(); // 对话框数据 #ifdef AFX_DESIGN_TIME enum { IDD = IDD_DIALOG_COMMSET1 }; #endif protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 DECLARE_MESSAGE_MAP() afx_msg BOOL OnDeviceChange(UINT nEventType, DWORD_PTR dwData); public: virtual BOOL OnInitDialog(); virtual void OnOK(); int DisplayParams(); int GetParams(); int ShowParams(); int UpdateComPortList(); CComboBox m_combo_comport; CString sComSelStr; bool m_bOpened = false; int nLastComPort = 0; int m_nComNum; int m_nBaudRate; CStringA m_Settings; afx_msg void OnBnClickedOk(); afx_msg void OnBnClickedButtonInit(); };