Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

MainFrm.cpp

Go to the documentation of this file.
00001 // MainFrm.cpp : Implementierung der Klasse CMainFrame
00002 //
00003 
00004 #include "stdafx.h"
00005 #include "vtkSq3Subdivision.h"
00006 
00007 #include "MainFrm.h"
00008 #include "vtk3DSOurImporter.h"
00009 
00010 #ifdef _DEBUG
00011 #define new DEBUG_NEW
00012 #endif
00013 
00014 
00015 // CMainFrame
00016 
00017 IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
00018 
00019 BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
00020         ON_WM_CREATE()
00021         ON_WM_HSCROLL()
00022 //      ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
00023 END_MESSAGE_MAP()
00024 
00025 static UINT indicators[] =
00026 {
00027         ID_SEPARATOR,           // Statusleistenanzeige
00028         ID_INDICATOR_CAPS,
00029         ID_INDICATOR_NUM,
00030         ID_INDICATOR_SCRL,
00031 };
00032 
00033 
00034 // CMainFrame Erstellung/Zerstörung
00035 
00036 CMainFrame::CMainFrame()
00037 {
00038         // TODO: Hier Code für die Memberinitialisierung einfügen
00039 }
00040 
00041 CMainFrame::~CMainFrame()
00042 {
00043 }
00044 
00045 
00046 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
00047 {
00048         if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
00049                 return -1;
00050         
00051         if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
00052                 | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
00053                 !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
00054         {
00055                 TRACE0("Symbolleiste konnte nicht erstellt werden\n");
00056                 return -1;      // Fehler bei Erstellung
00057         }
00058 
00059         if (!m_wndStatusBar.Create(this) ||
00060                 !m_wndStatusBar.SetIndicators(indicators,
00061                   sizeof(indicators)/sizeof(UINT)))
00062         {
00063                 TRACE0("Statusleiste konnte nicht erstellt werden\n");
00064                 return -1;      // Fehler bei Erstellung
00065         }
00066         // TODO: Löschen Sie diese drei Zeilen, wenn Sie nicht möchten, dass die Systemleiste andockbar ist
00067         m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
00068         EnableDocking(CBRS_ALIGN_ANY);
00069         DockControlBar(&m_wndToolBar);
00070 /*
00071         if (!m_rebar.Create(this) )
00072         {
00073                 return -1;
00074         }
00075         m_button.Create("View", WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX, CRect(0,5,120,30), this, IDC_BUTTON);
00076         
00077         m_trackbar.Create(WS_CHILD|WS_VISIBLE|WS_BORDER|TBS_AUTOTICKS|TBS_BOTH|TBS_HORZ, CRect(10,0,100,45), this, IDC_TRACKBAR);
00078         m_trackbar.SetRange(0,10,TRUE);
00079         m_trackbar.SetTicFreq(1);
00080         m_trackbar.SetLineSize(2);
00081         m_trackbar.SetPageSize(10);
00082         m_rebar.AddBar(&m_trackbar, "Number of Iterations: ", NULL, RBBS_NOGRIPPER);
00083         m_rebar.AddBar(&m_button, "", NULL, RBBS_NOGRIPPER);*/
00084         return 0;
00085 }
00086 
00087 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
00088 {
00089         if( !CMDIFrameWnd::PreCreateWindow(cs) )
00090                 return FALSE;
00091         // TODO: Ändern Sie hier die Fensterklasse oder die Darstellung, indem Sie
00092         //  CREATESTRUCT cs modifizieren.
00093 
00094         return TRUE;
00095 }
00096 
00097 
00098 // CMainFrame Diagnose
00099 
00100 #ifdef _DEBUG
00101 void CMainFrame::AssertValid() const
00102 {
00103         CMDIFrameWnd::AssertValid();
00104 }
00105 
00106 void CMainFrame::Dump(CDumpContext& dc) const
00107 {
00108         CMDIFrameWnd::Dump(dc);
00109 }
00110 
00111 #endif //_DEBUG
00112 
00113 
00114 // CMainFrame Meldungshandler
00115 
00116 
00117 void CMainFrame::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
00118 {
00119         // TODO: Fügen Sie hier Ihren Meldungsbehandlungscode ein, und/oder benutzen Sie den Standard.
00120         AfxMessageBox("scroll");
00121         CMDIFrameWnd::OnHScroll(nSBCode, nPos, pScrollBar);
00122 }
00123 
00124 //void CMainFrame::OnFileOpen()
00125 //{
00126 //      // TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
00127 //}

Generated on Thu Jul 3 16:54:23 2003 for Sq3Subdivision by doxygen1.2.18