void CBNDlg::OnBnClickedEnableDisable()
{
BOOL bState=GetDlgItem(IDC_LEFT)->IsWindowEnabled();
GetDlgItem(IDC_LEFT)->IsWindowEnabled(!bState);
GetDlgItem(IDC_CENTER)->IsWindowEnabled(!bState);
GetDlgItem(IDC_RIGHT)->IsWindowEnabled(!bState);
GetDlgItem(IDC_ENABLE_DISABLE)->SetWindowText(bState?"DISABLE":"ENABLE");
BNDlg.cpp
d:\程序设计\bn\bn\bndlg.cpp(167) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char *' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
d:\程序设计\bn\bn\bndlg.cpp(173) : error C2660: 'CWnd::IsWindowEnabled' : function does not take 1 arguments
d:\程序设计\bn\bn\bndlg.cpp(174) : error C2660: 'CWnd::IsWindowEnabled' : function does not take 1 arguments
d:\程序设计\bn\bn\bndlg.cpp(175) : error C2660: 'CWnd::IsWindowEnabled' : function does not take 1 arguments
d:\程序设计\bn\bn\bndlg.cpp(176) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char *' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
d:\程序设计\bn\bn\bndlg.cpp(200) : error C2065: 'm_nIDofLastButton' : undeclared identifier
{
BOOL bState=GetDlgItem(IDC_LEFT)->IsWindowEnabled();
GetDlgItem(IDC_LEFT)->IsWindowEnabled(!bState);
GetDlgItem(IDC_CENTER)->IsWindowEnabled(!bState);
GetDlgItem(IDC_RIGHT)->IsWindowEnabled(!bState);
GetDlgItem(IDC_ENABLE_DISABLE)->SetWindowText(bState?"DISABLE":"ENABLE");
BNDlg.cpp
d:\程序设计\bn\bn\bndlg.cpp(167) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char *' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
d:\程序设计\bn\bn\bndlg.cpp(173) : error C2660: 'CWnd::IsWindowEnabled' : function does not take 1 arguments
d:\程序设计\bn\bn\bndlg.cpp(174) : error C2660: 'CWnd::IsWindowEnabled' : function does not take 1 arguments
d:\程序设计\bn\bn\bndlg.cpp(175) : error C2660: 'CWnd::IsWindowEnabled' : function does not take 1 arguments
d:\程序设计\bn\bn\bndlg.cpp(176) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char *' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
d:\程序设计\bn\bn\bndlg.cpp(200) : error C2065: 'm_nIDofLastButton' : undeclared identifier
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
d:\程序设计\bn\bn\bndlg.cpp(176) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char *' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
就是对的呢?
两个有什么区别么?