VTK  9.3.20240415
vtkMFCWindow.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
4 #ifndef vtkMFCWindow_h
5 #define vtkMFCWindow_h
6 
7 #include "afxwin.h"
8 #include "vtkGUISupportMFCModule.h" // For export macro
9 
10 VTK_ABI_NAMESPACE_BEGIN
13 
15 class VTKGUISUPPORTMFC_EXPORT vtkMFCWindow : public CWnd
16 {
17 public:
19  vtkMFCWindow(CWnd* pcWnd);
21  virtual ~vtkMFCWindow();
22 
23 #ifdef _DEBUG
24  virtual void AssertValid() const;
25  virtual void Dump(CDumpContext& dc) const;
26 #endif
27 
29  void DrawDC(CDC* pDC);
30 
37 
38 protected:
40  afx_msg void OnSize(UINT nType, int cx, int cy);
42  afx_msg void OnPaint();
44  afx_msg void OnDestroy();
46  BOOL OnEraseBkgnd(CDC* pDC);
47 
48  afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
49  afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
50  afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
51  afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
52  afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
53  afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
54  afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
55  afx_msg void OnMouseMove(UINT nFlags, CPoint point);
56  afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
57  afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
58  afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
59  afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
60  afx_msg void OnTimer(UINT_PTR nIDEvent);
61 
64 
65  DECLARE_MESSAGE_MAP()
66 };
67 
68 VTK_ABI_NAMESPACE_END
69 #endif
70 
71 // VTK-HeaderTest-Exclude: vtkMFCWindow.h
class to display a VTK window in an MFC window
Definition: vtkMFCWindow.h:16
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
Definition: vtkMFCWindow.h:63
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
afx_msg void OnPaint()
handle paint events
virtual vtkRenderWindowInteractor * GetInteractor()
get the interactor
afx_msg void OnDestroy()
handle destroy events
virtual vtkWin32OpenGLRenderWindow * GetRenderWindow()
get the render window
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.
@ point
Definition: vtkX3D.h:236