错误提示:
1>.\adujstrowcoldlg.cpp(42) : error C2143: syntax error : missing '}' before ';'
1>.\adujstrowcoldlg.cpp(44) : error C2143: syntax error : missing ';' before '}'
1>.\adujstrowcoldlg.cpp(44) : error C2653: 'TheBaseClass' : is not a class or namespace name
1>.\adujstrowcoldlg.cpp(44) : error C2065: 'GetThisMessageMap' : undeclared identifier
1>.\adujstrowcoldlg.cpp(44) : error C2065: '_messageEntries' : undeclared identifier
1>.\adujstrowcoldlg.cpp(44) : error C2059: syntax error : 'return'
1>.\adujstrowcoldlg.cpp(44) : error C2059: syntax error : '}'
1>.\adujstrowcoldlg.cpp(44) : error C2143: syntax error : missing ';' before '}'
1>.\adujstrowcoldlg.cpp(44) : error C2059: syntax error : '}'
该错误都指向的是
BEGIN_MESSAGE_MAP(CAdujstRowColDlg, CDialog)
//{{AFX_MSG_MAP(CAdujstRowColDlg)
ON_WM_HELPINFO();
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
不知道为什么,请高人指点迷津。谢谢
1>.\adujstrowcoldlg.cpp(42) : error C2143: syntax error : missing '}' before ';'
1>.\adujstrowcoldlg.cpp(44) : error C2143: syntax error : missing ';' before '}'
1>.\adujstrowcoldlg.cpp(44) : error C2653: 'TheBaseClass' : is not a class or namespace name
1>.\adujstrowcoldlg.cpp(44) : error C2065: 'GetThisMessageMap' : undeclared identifier
1>.\adujstrowcoldlg.cpp(44) : error C2065: '_messageEntries' : undeclared identifier
1>.\adujstrowcoldlg.cpp(44) : error C2059: syntax error : 'return'
1>.\adujstrowcoldlg.cpp(44) : error C2059: syntax error : '}'
1>.\adujstrowcoldlg.cpp(44) : error C2143: syntax error : missing ';' before '}'
1>.\adujstrowcoldlg.cpp(44) : error C2059: syntax error : '}'
该错误都指向的是
BEGIN_MESSAGE_MAP(CAdujstRowColDlg, CDialog)
//{{AFX_MSG_MAP(CAdujstRowColDlg)
ON_WM_HELPINFO();
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
不知道为什么,请高人指点迷津。谢谢
ON_WM_HELPINFO();
分号不要!
1>.\realreportdlg.cpp(61) : error C2143: syntax error : missing '}' before '{'
1>.\realreportdlg.cpp(61) : error C2143: syntax error : missing ';' before '{'
1>.\realreportdlg.cpp(61) : error C2143: syntax error : missing ';' before '}'
1>.\realreportdlg.cpp(61) : error C2653: 'TheBaseClass' : is not a class or namespace name
1>.\realreportdlg.cpp(61) : error C2065: 'GetThisMessageMap' : undeclared identifier
1>.\realreportdlg.cpp(61) : error C2065: '_messageEntries' : undeclared identifier
1>.\realreportdlg.cpp(61) : error C2059: syntax error : 'return'
1>.\realreportdlg.cpp(61) : error C2059: syntax error : '}'
1>.\realreportdlg.cpp(61) : error C2143: syntax error : missing ';' before '}'
1>.\realreportdlg.cpp(61) : error C2059: syntax error : '}'
指向的位置:BEGIN_MESSAGE_MAP(CRealReportDlg, CDialog)
//{{AFX_MSG_MAP(CRealReportDlg)
ON_BN_CLICKED(IDC_WINDOW_RADIO, OnWindowRadio)
ON_BN_CLICKED(IDC_CONTENT_RADIO, OnContentRadio)
ON_BN_CLICKED(IDC_WIDTH_RADIO, OnWidthRadio)
ON_BN_CLICKED(IDC_REPORT_STYLE_BUTTON, OnReportStyleButton)
ON_EN_CHANGE(IDC_COLUMN_WIDTH_EDIT, OnChangeColumnWidthEdit)
ON_WM_HELPINFO()
#ifndef _WIN32_WCE //2004-2-3 WangYH add case for WCE;
ON_WM_CONTEXTMENU()
#endif
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
//#include "stdafx.h"
#include "report.h"
#include "AdujstRowColDlg.h"
#include "GridCtrl_src/GridCtrl.h"
#include "RealReportDlg.h"
#include "WinUser.h" //bms
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif/////////////////////////////////////////////////////////////////////////////
// CAdujstRowColDlg dialog
CAdujstRowColDlg::CAdujstRowColDlg(CWnd* pParent /*=NULL*/, BOOL bIsInsert /*=TRUE*/)
: CDialog(CAdujstRowColDlg::IDD, pParent)
{
m_pGridCtrl = (CGridCtrl*)pParent ;
m_bIsInsert = bIsInsert ;
//{{AFX_DATA_INIT(CAdujstRowColDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CAdujstRowColDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAdujstRowColDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAdujstRowColDlg, CDialog)
//{{AFX_MSG_MAP(CAdujstRowColDlg)
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////
// CAdujstRowColDlg message handlersint CAdujstRowColDlg::DoModal()
{
// TODO: Add your specialized code here and/or call the base class
((CReportApp*)AfxGetApp())->ShowTooBarWindow(SW_HIDE) ;
int nRet = CDialog::DoModal();
((CReportApp*)AfxGetApp())->ShowTooBarWindow(SW_SHOW) ; return nRet ;
}BOOL CAdujstRowColDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CButton* pRadioButton = (CButton*)GetDlgItem(IDC_RADIO_ROW) ;
if( pRadioButton )
{
pRadioButton->SetCheck(TRUE) ;
}
if( !m_bIsInsert )//delete cells
{
CString str ;
str.LoadString(IDS_DELETE) ;
SetWindowText(str) ; CStatic* pStatic = (CStatic*)GetDlgItem(IDC_STATIC_INSERT) ;
if( pStatic != NULL)
{
pStatic->SetWindowText(str) ;
}
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}void CAdujstRowColDlg::OnOK()
{
// TODO: Add extra validation here
CWaitCursor wait ;
if( m_pGridCtrl != NULL )
{
CCellID cell = m_pGridCtrl->GetFocusCell() ; BOOL bIsRow = FALSE ;
BOOL bIsCol = FALSE ;
CButton* pRadioButton = (CButton*)GetDlgItem(IDC_RADIO_ROW) ;
if( pRadioButton )
{
bIsRow = pRadioButton->GetCheck() ;
}
pRadioButton = (CButton*)GetDlgItem(IDC_RADIO_COL) ;
if( pRadioButton )
{
bIsCol = pRadioButton->GetCheck() ;
}
CDialog::OnOK(); if( bIsRow == TRUE && bIsCol == FALSE ||
bIsRow == FALSE && bIsCol == TRUE )
{
if( m_bIsInsert )
{
if( bIsRow )
m_pGridCtrl->InsertRow(_T(""), cell.row) ;
if( bIsCol )
m_pGridCtrl->InsertColumn(_T(""), 0, cell.col) ;
}
else
{
if( bIsRow )
m_pGridCtrl->DeleteRow(cell.row) ;
if( bIsCol )
m_pGridCtrl->DeleteColumn(cell.col) ;
}
}
}
else
CDialog::OnOK();
}BOOL CAdujstRowColDlg::OnHelpInfo(HELPINFO* pHelpInfo)
{
// TODO: Add your message handler code here and/or call default
///////////////// Begin of _FEATURE_USE_ ///////////////////////////
#ifdef _FEATURE_USE_
UINT dwText = CRealReportDlg::GetHelpStringID( pHelpInfo->iCtrlId ) ;
if( dwText == 0 )
return FALSE ;
CRealReportDlg::ShowHtmlHelpMessage(m_hWnd, dwText, pHelpInfo->MousePos) ;
return CDialog::OnHelpInfo(pHelpInfo);
#endif
///////////////// End of _FEATURE_USE_ ///////////////////////////
return FALSE; //2004-2-3 WangYH Add;
}
TheBaseClass定义可能有误