VTK  9.2.6
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 vtkMFCWindow_h
17#define vtkMFCWindow_h
18
19#include "afxwin.h"
20#include "vtkGUISupportMFCModule.h" // For export macro
21
24
26class VTKGUISUPPORTMFC_EXPORT vtkMFCWindow : public CWnd
27{
28public:
30 vtkMFCWindow(CWnd* pcWnd);
32 virtual ~vtkMFCWindow();
33
34#ifdef _DEBUG
35 virtual void AssertValid() const;
36 virtual void Dump(CDumpContext& dc) const;
37#endif
38
40 void DrawDC(CDC* pDC);
41
48
49protected:
51 afx_msg void OnSize(UINT nType, int cx, int cy);
53 afx_msg void OnPaint();
55 afx_msg void OnDestroy();
57 BOOL OnEraseBkgnd(CDC* pDC);
58
59 afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
60 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
61 afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
62 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
63 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
64 afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
65 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
66 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
67 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
68 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
69 afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
70 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
71 afx_msg void OnTimer(UINT_PTR nIDEvent);
72
75
76 DECLARE_MESSAGE_MAP()
77};
78
79#endif
80
81// VTK-HeaderTest-Exclude: vtkMFCWindow.h
class to display a VTK window in an MFC window
afx_msg void OnMouseMove(UINT nFlags, CPoint point)
afx_msg void OnMButtonDown(UINT nFlags, CPoint point)
BOOL OnEraseBkgnd(CDC *pDC)
don't clear background
vtkMFCWindow(CWnd *pcWnd)
constructor requires a parent
afx_msg void OnRButtonDown(UINT nFlags, CPoint point)
vtkWin32OpenGLRenderWindow * pvtkWin32OpenGLRW
the vtk window
virtual void SetRenderWindow(vtkWin32OpenGLRenderWindow *)
give an instance of a vtk render window to the mfc window
afx_msg void OnRButtonUp(UINT nFlags, CPoint point)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point)
afx_msg void OnMButtonUp(UINT nFlags, CPoint point)
virtual ~vtkMFCWindow()
destructor
afx_msg void OnSize(UINT nType, int cx, int cy)
handle size events
virtual vtkWin32OpenGLRenderWindow * GetRenderWindow()
get the render window
afx_msg void OnPaint()
handle paint events
virtual vtkRenderWindowInteractor * GetInteractor()
get the interactor
afx_msg void OnDestroy()
handle destroy events
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnLButtonUp(UINT nFlags, CPoint point)
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point)
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
void DrawDC(CDC *pDC)
draw to a device context
afx_msg void OnTimer(UINT_PTR nIDEvent)
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
platform-independent render window interaction including picking and frame rate control.