VTK
vtkMFCWindow.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMFCWindow.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 #ifndef C_VTK_MFC_WINDOW
17 #define C_VTK_MFC_WINDOW
18 
19 #include "afxwin.h"
20 
23 
24 #include "vtkMFCConfigure.h"
25 
26 #if !defined(VTK_MFC_STATIC)
27 # if defined(vtkMFC_EXPORTS)
28 # define VTK_MFC_EXPORT __declspec( dllexport )
29 # else
30 # define VTK_MFC_EXPORT __declspec( dllimport )
31 # endif
32 #else
33 # define VTK_MFC_EXPORT
34 #endif
35 
37 class VTK_MFC_EXPORT vtkMFCWindow : public CWnd
38 {
39 public:
41  vtkMFCWindow(CWnd *pcWnd);
43  virtual ~vtkMFCWindow();
44 
45 #ifdef _DEBUG
46  virtual void AssertValid() const;
47  virtual void Dump(CDumpContext& dc) const;
48 #endif
49 
51  void DrawDC(CDC* pDC);
52 
54  virtual void SetRenderWindow(vtkWin32OpenGLRenderWindow*);
56  virtual vtkWin32OpenGLRenderWindow* GetRenderWindow();
58  virtual vtkRenderWindowInteractor* GetInteractor();
59 
60 protected:
61 
63  afx_msg void OnSize(UINT nType, int cx, int cy);
65  afx_msg void OnPaint();
67  afx_msg void OnDestroy();
69  BOOL OnEraseBkgnd(CDC* pDC);
70 
71  afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
72  afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
73  afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
74  afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
75  afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
76  afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
77  afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
78  afx_msg void OnMouseMove(UINT nFlags, CPoint point);
79  afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
80  afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
81  afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
82  afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
83  afx_msg void OnTimer(UINT_PTR nIDEvent);
84 
87 
88  DECLARE_MESSAGE_MAP()
89 };
90 
91 #endif