004
22.07.2004, 12:33 Uhr
~Schwabi
Gast
|
Jo, dadurch wird das alles schon mal etwas weniger, aber wie ich jetz den Zugriff auf die Klasse krieg weis ich nich.
Code: |
// MainFrm.h : Schnittstelle der Klasse CMainFrame // ///////////////////////////////////////////////////////////////////////////// #include "Tempcontroler2Doc.h" #include "Tempcontroler2View.h" #include "Tempcon_ParametrierungDoc.h" #include "Tempcon_ParametrierungView.h"
#if !defined(AFX_MAINFRM_H__4C08354D_785D_4BEC_8E03_7913FF2DA9AD__INCLUDED_) #define AFX_MAINFRM_H__4C08354D_785D_4BEC_8E03_7913FF2DA9AD__INCLUDED_
#if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000
class CMainFrame : public CFrameWnd { private: enum eView { FIRSTVIEW = 1, SECVIEW = 2 }; void SwitchToView(eView nView) { CView* pOldActiveView = GetActiveView(); CView* pNewActiveView = (CView*) GetDlgItem(nView);
if (pNewActiveView == NULL) { switch (nView) { case FIRSTVIEW : pNewActiveView = (CView*) new CTempcontroler2View; break; case SECVIEW : pNewActiveView = (CView*) new CTempcon_ParametrierungView; break; }
CCreateContext context; context.m_pCurrentDoc = pOldActiveView->GetDocument(); pNewActiveView->Create(NULL, NULL, WS_BORDER, CFrameWnd::rectDefault, this, nView, &context); pNewActiveView->OnInitialUpdate(); }
SetActiveView(pNewActiveView); pNewActiveView->ShowWindow(SW_SHOW); pOldActiveView->ShowWindow(SW_HIDE); pOldActiveView->SetDlgCtrlID(pOldActiveView->GetRuntimeClass() == RUNTIME_CLASS(CTempcontroler2View) ? FIRSTVIEW : HEX); pNewActiveView->SetDlgCtrlID(AFX_IDW_PANE_FIRST); RecalcLayout();
}
protected: // Nur aus Serialisierung erzeugen CMainFrame(); DECLARE_DYNCREATE(CMainFrame)
// Attribute public:
// Operationen public:
//schliesslich der uebrige kram
|
Hier mal die anderen zwei Headerdateien:
Code: |
// Tempcontroler2View.h : Schnittstelle der Klasse CTempcontroler2View // /////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_TEMPCONTROLER2VIEW_H__EEDE8C90_94FC_456F_8A63_78ECE71FA01A__INCLUDED_) #define AFX_TEMPCONTROLER2VIEW_H__EEDE8C90_94FC_456F_8A63_78ECE71FA01A__INCLUDED_
#if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000
class CTempcontroler2View : public CFormView { protected: // Nur aus Serialisierung erzeugen CTempcontroler2View(); DECLARE_DYNCREATE(CTempcontroler2View)
public: //{{AFX_DATA(CTempcontroler2View) enum { IDD = IDD_TEMPCONTROLER2_FORM }; CEdit m_cedit1; int m_edit1; int m_edit2; int m_edit3; int m_edit4; int m_edit5; int m_edit6; //}}AFX_DATA
// Attribute bool m_toggle; int channel[6]; int messung[6]; public: CTempcontroler2Doc* GetDocument();
// Operationen public:
// Überladungen // Vom Klassenassistenten generierte Überladungen virtueller Funktionen //{{AFX_VIRTUAL(CTempcontroler2View) public: virtual BOOL PreCreateWindow(CREATESTRUCT& cs); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV-Unterstützung virtual void OnInitialUpdate(); // das erste mal nach der Konstruktion aufgerufen //}}AFX_VIRTUAL
// Implementierung public: virtual ~CTempcontroler2View(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif
protected:
// Generierte Message-Map-Funktionen protected: //{{AFX_MSG(CTempcontroler2View) afx_msg void OnTimer(UINT nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() };
#ifndef _DEBUG // Testversion in Tempcontroler2View.cpp inline CTempcontroler2Doc* CTempcontroler2View::GetDocument() { return (CTempcontroler2Doc*)m_pDocument; } #endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.
#endif // !defined(AFX_TEMPCONTROLER2VIEW_H__EEDE8C90_94FC_456F_8A63_78ECE71FA01A__INCLUDED_)
|
Code: |
// Tempcon_ParametrierungView.h : Schnittstelle der Klasse CTempcon_ParametrierungView // /////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_TEMPCON_PARAMETRIERUNGVIEW_H__D95FF188_158F_4F43_90CB_912F104FFA41__INCLUDED_) #define AFX_TEMPCON_PARAMETRIERUNGVIEW_H__D95FF188_158F_4F43_90CB_912F104FFA41__INCLUDED_
#if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000
class CTempcon_ParametrierungView : public CFormView { protected: // Nur aus Serialisierung erzeugen CTempcon_ParametrierungView(); DECLARE_DYNCREATE(CTempcon_ParametrierungView)
public: //{{AFX_DATA(CTempcon_ParametrierungView) enum { IDD = IDD_TEMPCON_PARAMETRIERUNG_FORM }; CEdit m_edit93c; CEdit m_edit55; double m_Pb1; double Pb1; double m_Pb2; double Pb2; double m_ti1; double ti1; double m_ti2; double ti2; double m_td1; double td1; double m_td2; double td2; double m_t1; double t1; double m_t2; double t2; double m_tP; double tP; double m_ton; double ton; double m_toff; double toff; double m_FH2O; double FH2O; double m_EH2O; double EH2O; double m_SH; double SH; double m_tt; double tt; double m_dSP; double dSP; double m_Y2; double Y2; double m_YLo; double YLo; double m_YHi; double YHi; double m_Y0; double Y0; double m_YmH; double YmH; double m_LYm; double LYm; double m_YSt; double YSt; BOOL m_check1; BOOL m_check2; BOOL m_check3; BOOL m_check4; BOOL m_check5; BOOL m_check6; BOOL m_check7; BOOL m_check8; BOOL m_check9; BOOL m_check10; BOOL m_check11; BOOL m_check12; BOOL m_check13; BOOL m_check14; BOOL m_check15; BOOL m_check16; BOOL m_check17; BOOL m_check18; BOOL m_check19; BOOL m_check20; BOOL m_check21; BOOL m_check22; BOOL m_check23; BOOL m_channel1; BOOL m_channel2; BOOL m_channel3; BOOL m_channel4; BOOL m_channel5; BOOL m_channel6; //}}AFX_DATA
// Attribute int check[23]; int edit[23]; double standard[23];
public: CTempcon_ParametrierungDoc* GetDocument();
// Operationen public:
// Überladungen // Vom Klassenassistenten generierte Überladungen virtueller Funktionen //{{AFX_VIRTUAL(CTempcon_ParametrierungView) public: virtual BOOL PreCreateWindow(CREATESTRUCT& cs); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV-Unterstützung virtual void OnInitialUpdate(); // das erste mal nach der Konstruktion aufgerufen //}}AFX_VIRTUAL
// Implementierung public: virtual ~CTempcon_ParametrierungView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif
protected:
// Generierte Message-Map-Funktionen protected: //{{AFX_MSG(CTempcon_ParametrierungView) afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnParametrierungConfigurate(); afx_msg void OnButton1(); afx_msg void OnChangeEdit47(); afx_msg void OnChangeEdit49(); afx_msg void OnChangeEdit50(); afx_msg void OnChangeEdit51(); afx_msg void OnChangeEdit52(); afx_msg void OnChangeEdit53(); afx_msg void OnChangeEdit54(); afx_msg void OnChangeEdit55(); afx_msg void OnChangeEdit56(); afx_msg void OnChangeEdit57(); afx_msg void OnChangeEdit58(); afx_msg void OnChangeEdit59(); afx_msg void OnChangeEdit60(); afx_msg void OnChangeEdit61(); afx_msg void OnChangeEdit62(); afx_msg void OnChangeEdit63(); afx_msg void OnChangeEdit64(); afx_msg void OnChangeEdit65(); afx_msg void OnChangeEdit66(); afx_msg void OnChangeEdit67(); afx_msg void OnChangeEdit68(); afx_msg void OnChangeEdit69(); afx_msg void OnChangeEdit48(); //}}AFX_MSG DECLARE_MESSAGE_MAP() };
#ifndef _DEBUG // Testversion in Tempcon_ParametrierungView.cpp inline CTempcon_ParametrierungDoc* CTempcon_ParametrierungView::GetDocument() { return (CTempcon_ParametrierungDoc*)m_pDocument; } #endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.
#endif // !defined(AFX_TEMPCON_PARAMETRIERUNGVIEW_H__D95FF188_158F_4F43_90CB_912F104FFA41__INCLUDED_)
|
Ich bekomme zur Zeit folgende Fehlermeldung:
Code: |
MainFrm.cpp error C2248: "CTempcontroler2View::CTempcontroler2View" : Kein Zugriff auf protected Element, dessen Deklaration in der Klasse "CTempcontroler2View" erfolgte Siehe Deklaration von 'CTempcontroler2View::CTempcontroler2View' error C2248: "CTempcon_ParametrierungView::CTempcon_ParametrierungView" : Kein Zugriff auf protected Element, dessen Deklaration in der Klasse "CTempcon_ParametrierungView" erfolgte Siehe Deklaration von 'CTempcon_ParametrierungView::CTempcon_ParametrierungView' error C2065: 'HEX' : nichtdeklarierter Bezeichner Fehler beim Ausführen von cl.exe.
|
Was das 'HEX' bedeutet weiss ich auch nich so wirklich. Koennt ihr mir da weiter helfen? |