// ReseauxCAN.cpp : implementation file // #include "stdafx.h" #include "ROBOTDoc.h" #include "ROBOT.h" #include "ReseauxCAN.h" #include "ConfigurationCAN.h" #include "ConfigurationID.h" #include "InterfaceCAN.h" #include "Canpcex.h" #include #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CReseauxCAN IMPLEMENT_DYNCREATE(CReseauxCAN, CFormView) CReseauxCAN::CReseauxCAN() : CFormView(CReseauxCAN::IDD) { //{{AFX_DATA_INIT(CReseauxCAN) m_test = _T(""); //}}AFX_DATA_INIT } CReseauxCAN::~CReseauxCAN() { } void CReseauxCAN::DoDataExchange(CDataExchange* pDX) { CFormView::DoDataExchange(pDX); //{{AFX_DATA_MAP(CReseauxCAN) DDX_Control(pDX, IDC_LISTCAN, m_ListCAN); DDX_Text(pDX, IDC_EDIT1, m_test); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CReseauxCAN, CFormView) //{{AFX_MSG_MAP(CReseauxCAN) ON_BN_CLICKED(IDC_BUTTONCONFIG, OnButtonconfigID) ON_BN_CLICKED(IDC_BUTTONDEMARRER, OnButtondemarrer) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CReseauxCAN diagnostics #ifdef _DEBUG void CReseauxCAN::AssertValid() const { CFormView::AssertValid(); } void CReseauxCAN::Dump(CDumpContext& dc) const { CFormView::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CReseauxCAN message handlers void CReseauxCAN::OnInitialUpdate() { CFormView::OnInitialUpdate(); CRect RectFrame; // Récupération de la taille de la mdi GetParentFrame()->GetWindowRect(&RectFrame); // changement de la hauteur sans bouger la fenêtre . GetParentFrame()->SetWindowPos(NULL,400,0,550,380, SWP_NOZORDER); //Colonne de la liste// strText.Format(TEXT("E/R")); //Nom de la colonne m_ListCAN.InsertColumn(0,strText,LVCFMT_LEFT,70); //insert les colonnes strText.Format(TEXT("ID")); //Nom de la colonne m_ListCAN.InsertColumn(1,strText,LVCFMT_LEFT,70); //insert les colonnes strText.Format(TEXT("DATA")); //Nom de la colonne m_ListCAN.InsertColumn(2,strText,LVCFMT_LEFT,70); //insert les colonnes strText.Format(TEXT("TAILLE")); //Nom de la colonne m_ListCAN.InsertColumn(3,strText,LVCFMT_LEFT,70); //insert les colonnes strText.Format(TEXT("ERROR")); //Nom de la colonne m_ListCAN.InsertColumn(4,strText,LVCFMT_LEFT,70); //insert les colonnes strText.Format(TEXT("CANAL")); //Nom de la colonne m_ListCAN.InsertColumn(5,strText,LVCFMT_LEFT,70); //insert les colonnes /* CMDIFrameWnd *pFrame = (CMDIFrameWnd *)AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CReseauxCAN *pView2 = (CReseauxCAN *) pChild->GetActiveView(); */ } void CReseauxCAN::OnButtonconfigID() { UpdateData(TRUE); CConfigurationID dlg; if(dlg.DoModal()==IDOK) { } } void CReseauxCAN::OnButtondemarrer() { }