为什么edit的onchange事件没响应的? 现在输入什么都没反应的.是不是有什么地方关了的.一直找不到原因的?void CTab4::OnChangeEdit1() { MessageBox("该参数修范围为(0-10)","输入错误",MB_OK);} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 看看你的BEGIN_MESSAGE_MAP部分还有头文件中的// Generated message map functions //{{AFX_MSG(CTableView)部分 BEGIN_MESSAGE_MAP(CTab4, CDialog) //{{AFX_MSG_MAP(CTab4) ON_WM_TIMER() ON_EN_KILLFOCUS(IDC_EDIT1, OnKillfocusEdit1) ON_EN_KILLFOCUS(IDC_EDIT2, OnKillfocusEdit2) ON_EN_KILLFOCUS(IDC_EDIT3, OnKillfocusEdit3) ON_WM_PAINT() ON_WM_CTLCOLOR() ON_EN_KILLFOCUS(IDC_EDIT4, OnKillfocusEdit4) ON_EN_KILLFOCUS(IDC_EDIT5, OnKillfocusEdit5) ON_EN_KILLFOCUS(IDC_EDIT6, OnKillfocusEdit6) ON_EN_KILLFOCUS(IDC_EDIT7, OnKillfocusEdit7) ON_EN_KILLFOCUS(IDC_EDIT8, OnKillfocusEdit8) ON_EN_SETFOCUS(IDC_EDIT1, OnSetfocusEdit1) ON_WM_DESTROY() ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1) ON_EN_CHANGE(IDC_EDIT2, OnChangeEdit2) //}}AFX_MSG_MAPEND_MESSAGE_MAP() //{{AFX_MSG(CTab4) afx_msg void OnTimer(UINT nIDEvent); virtual BOOL OnInitDialog(); afx_msg void OnKillfocusEdit1(); afx_msg void OnKillfocusEdit2(); afx_msg void OnKillfocusEdit3(); afx_msg void OnPaint(); afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); afx_msg void OnKillfocusEdit4(); afx_msg void OnKillfocusEdit5(); afx_msg void OnKillfocusEdit6(); afx_msg void OnKillfocusEdit7(); afx_msg void OnKillfocusEdit8(); afx_msg void OnSetfocusEdit1(); afx_msg void OnDestroy(); afx_msg void OnChangeEdit1(); afx_msg void OnChangeEdit2(); afx_msg void OnChangeEdit9(); //}}AFX_MSG 什么问题的。不会是因为这个定义吧 DDX_Control(pDX, IDC_EDIT1, myedit1); DDX_Control(pDX, IDC_EDIT2, myedit2); DDX_Control(pDX, IDC_EDIT3, myedit3); DDX_Control(pDX, IDC_EDIT4, myedit4); DDX_Control(pDX, IDC_EDIT5, myedit5); DDX_Control(pDX, IDC_EDIT6, myedit6); DDX_Control(pDX, IDC_EDIT7, myedit7); DDX_Control(pDX, IDC_EDIT8, myedit8); CMyEditCtrl myedit1; CMyEditCtrl myedit2; CMyEditCtrl myedit3; CMyEditCtrl myedit4; CMyEditCtrl myedit5; CMyEditCtrl myedit6; CMyEditCtrl myedit7; CMyEditCtrl myedit8; MFC画了一条红色的线.但是保存为图像的时候还是黑色 CStatic背景不能刷新? 如何将一个编译好的C++算法加到主程序中 关于PUDN 請問MFC+Thread的問題(急) 函数或变量前加FAR或者NEAR是什么意思?(对高手来说摆明是送分) 程序报错! 关于字符串查找问题 vs.net的安装问题 为消息机制想破了头,高手看看我理解的对不对??555救救我吧!!! 出钱请人写论文。价格面议! 怎样同时更新Splitter window里pane的大小?
还有头文件中的// Generated message map functions
//{{AFX_MSG(CTableView)部分
//{{AFX_MSG_MAP(CTab4)
ON_WM_TIMER()
ON_EN_KILLFOCUS(IDC_EDIT1, OnKillfocusEdit1)
ON_EN_KILLFOCUS(IDC_EDIT2, OnKillfocusEdit2)
ON_EN_KILLFOCUS(IDC_EDIT3, OnKillfocusEdit3)
ON_WM_PAINT()
ON_WM_CTLCOLOR()
ON_EN_KILLFOCUS(IDC_EDIT4, OnKillfocusEdit4)
ON_EN_KILLFOCUS(IDC_EDIT5, OnKillfocusEdit5)
ON_EN_KILLFOCUS(IDC_EDIT6, OnKillfocusEdit6)
ON_EN_KILLFOCUS(IDC_EDIT7, OnKillfocusEdit7)
ON_EN_KILLFOCUS(IDC_EDIT8, OnKillfocusEdit8)
ON_EN_SETFOCUS(IDC_EDIT1, OnSetfocusEdit1)
ON_WM_DESTROY()
ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1)
ON_EN_CHANGE(IDC_EDIT2, OnChangeEdit2)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
//{{AFX_MSG(CTab4)
afx_msg void OnTimer(UINT nIDEvent);
virtual BOOL OnInitDialog();
afx_msg void OnKillfocusEdit1();
afx_msg void OnKillfocusEdit2();
afx_msg void OnKillfocusEdit3();
afx_msg void OnPaint();
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnKillfocusEdit4();
afx_msg void OnKillfocusEdit5();
afx_msg void OnKillfocusEdit6();
afx_msg void OnKillfocusEdit7();
afx_msg void OnKillfocusEdit8();
afx_msg void OnSetfocusEdit1();
afx_msg void OnDestroy();
afx_msg void OnChangeEdit1();
afx_msg void OnChangeEdit2();
afx_msg void OnChangeEdit9();
//}}AFX_MSG
不会是因为这个定义吧
DDX_Control(pDX, IDC_EDIT1, myedit1);
DDX_Control(pDX, IDC_EDIT2, myedit2);
DDX_Control(pDX, IDC_EDIT3, myedit3);
DDX_Control(pDX, IDC_EDIT4, myedit4);
DDX_Control(pDX, IDC_EDIT5, myedit5);
DDX_Control(pDX, IDC_EDIT6, myedit6);
DDX_Control(pDX, IDC_EDIT7, myedit7);
DDX_Control(pDX, IDC_EDIT8, myedit8);
CMyEditCtrl myedit1;
CMyEditCtrl myedit2;
CMyEditCtrl myedit3;
CMyEditCtrl myedit4;
CMyEditCtrl myedit5;
CMyEditCtrl myedit6;
CMyEditCtrl myedit7;
CMyEditCtrl myedit8;