一个vtk与itk和mfc集成的程序,在VS2008编译出现如上异常,求大侠们帮忙解决
一个vtk与itk和mfc集成的程序,在VS2008编译出现如下错误,求大侠们帮忙解决
本帖最后由 zhaoshenglili 于 2012-10-29 11:18:03 编辑
------最佳解决方案--------------------
SWP_NOZORDER
------其他解决方案--------------------
SWP_NOZORDER
------其他解决方案--------------------
这是整个的源码,上面是出问题的部分。
本帖最后由 zhaoshenglili 于 2012-10-29 11:18:03 编辑
BEGIN_MESSAGE_MAP(CvtkDLGDlg, CDialog)
{
// ON_WM_SYSCOMMAND()
ON_WM_PAINT()//"1>.\vtkDLGDlg.cpp(84) : error C2078: 初始值设定项太多" 这个错误指向这里
ON_WM_QUERYDRAGICON()
//}}AFX_MSG_MAP
ON_WM_DESTROY()
ON_WM_SIZE()
ON_BN_CLICKED(ID_LOADFILE, OnBtnLoadFile)
ON_BN_CLICKED(ID_RESETSCENE, OnBtnResetScene)//error C2440: “初始化”: 无法从“int”转换为“AFX_PMSG”
END_MESSAGE_MAP()//error C2143: 语法错误 : 缺少“}”(在“;”的前面)
}//error C2059: 语法错误 : “}”; error C2143: 语法错误 : 缺少“;”(在“}”的前面); error C2059: 语法错误 : “}”
// CvtkDLGDlg message handlers
void CvtkDLGDlg::ExecutePipeline()
{//error C2143: 语法错误 : 缺少“;”(在“{”的前面);;error C2447: “{”: 缺少函数标题(是否是老式的形式表?)
------最佳解决方案--------------------
SWP_NOZORDER
------其他解决方案--------------------
SWP_NOZORDER
------其他解决方案--------------------
这是整个的源码,上面是出问题的部分。
// vtkDLGDlg.cpp : implementation file
//
#include "stdafx.h"
#include "vtkDLG.h"
#include "vtkDLGDlg.h"
#include "vtkCallbackCommand.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
enum { IDD = IDD_ABOUTBOX };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Implementation
protected:
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
END_MESSAGE_MAP()
// CvtkDLGDlg dialog
CvtkDLGDlg::CvtkDLGDlg(CWnd* pParent /*=NULL*/)
: CDialog(CvtkDLGDlg::IDD, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
this->pvtkMFCWindow = NULL;
// set data reader to null
this->pvtkDataSetReader = NULL;
//itk部分:
reader= ReaderType::New();
connector= ConnectorType::New();
// Create the the renderer, window and interactor objects.
this->pvtkRenderer = vtkRenderer::New();
// Create the the objects used to form the visualisation.
this->pvtkDataSetMapper = vtkDataSetMapper::New();
this->pvtkActor = vtkActor::New();
this->pvtkActor2D = vtkActor2D::New();
this->pvtkTextMapper = vtkTextMapper::New();