所有自己添加的成员函数全都非法
连
void CSerDDlg::OnClear()
{
// TODO: Add your control notification handler code here
m_byRxNum=_T("");
UpdateData(FALSE);
}
都显示非法
error C2601: 'OnClear' : local function definitions are illegal
连
void CSerDDlg::OnClear()
{
// TODO: Add your control notification handler code here
m_byRxNum=_T("");
UpdateData(FALSE);
}
都显示非法
error C2601: 'OnClear' : local function definitions are illegal
//#if !defined(AFX_SERDDLG_H__F562DBD8_33CF_4F2E_99D2_344EC21FD979__INCLUDED_)
#define AFX_SERDDLG_H__F562DBD8_33CF_4F2E_99D2_344EC21FD979__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000/////////////////////////////////////////////////////////////////////////////
// CSerDDlg dialogclass CSerDDlg : public CDialog
{
// Construction
public:
CString DecimalToBinary(long DecimalValue, int minDigits);
CString Teshu(int intI, CString str);
float BinaryToDecimal1(CString BinaryValue);
int BinaryToDecimal(CString BinaryValue);
LRESULT OnComm(WPARAM wParam, LPARAM lParam);
CSerDDlg(CWnd* pParent = NULL); // standard constructor
………………………………
}前4个函数都错了
//#if !defined(AFX_SERDDLG_H__F562DBD8_33CF_4F2E_99D2_344EC21FD979__INCLUDED_)
#define AFX_SERDDLG_H__F562DBD8_33CF_4F2E_99D2_344EC21FD979__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000/////////////////////////////////////////////////////////////////////////////
// CSerDDlg dialogclass CSerDDlg : public CDialog
{
// Construction
public:
CString DecimalToBinary(long DecimalValue, int minDigits);
CString Teshu(int intI, CString str);
float BinaryToDecimal1(CString BinaryValue);
int BinaryToDecimal(CString BinaryValue);
LRESULT OnComm(WPARAM wParam, LPARAM lParam);
CSerDDlg(CWnd* pParent = NULL); // standard constructor// Dialog Data
//{{AFX_DATA(CSerDDlg)
enum { IDD = IDD_SERD_DIALOG };
BYTE m_byRxNum;
BYTE m_bySdNum;
//}}AFX_DATA // ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSerDDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
CWinThread* m_pThread; volatile HANDLE m_hPostMsgEvent;
OVERLAPPED m_osRead, m_osWrite;
volatile HANDLE m_hCom;
// Implementation
protected:
HICON m_hIcon; // Generated message map functions
//{{AFX_MSG(CSerDDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnSend();
afx_msg void OnClear();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_SERDDLG_H__F562DBD8_33CF_4F2E_99D2_344EC21FD979__INCLUDED_)