# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# vlMFC::MFCWindow Class Reference

The MFCWindow class is an MFC CWnd with the functionalities of a Win32Context. More...

`#include <MFCWindow.hpp>`

Inheritance diagram for vlMFC::MFCWindow:

List of all members.

## Public Member Functions
| MFCWindow ()
virtual | ~MFCWindow ()
bool | initMFCWindow (CWnd *parent, MFCWindow *share_context, const vl::String &title, const vl::OpenGLContextFormat &fmt, int x=0, int y=0, int width=640, int height=480)
| Creates the window and initializes the OpenGL rendering context.
virtual void | destroy ()
| calls destroyWindow() and dispatches the destroy event to the UIEventListener objects
void | destroyWindow ()
| Destroyes the window and the OpenGL rendering context.
HWND | hwnd () const
| Returns the Win32 window handle.
afx_msg void | OnPaint ()
afx_msg void | OnClose ()
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnMButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnMButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnMouseMove (UINT nFlags, CPoint point)
afx_msg BOOL | OnMouseWheel (UINT nFlags, short zDelta, CPoint pt)
afx_msg void | OnRButtonDblClk (UINT nFlags, CPoint point)
afx_msg void | OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void | OnRButtonUp (UINT nFlags, CPoint point)
afx_msg void | OnSize (UINT nType, int cx, int cy)
afx_msg void | OnTimer (UINT_PTR nIDEvent)
afx_msg void | OnDropFiles (HDROP hDropInfo)
## Protected Member Functions
void | CountAndCapture ()
void | CountAndRelease ()
## Protected Attributes
int | mMouseDownCount
## Static Protected Attributes
static CString | mClassName

## Detailed Description

The MFCWindow class is an MFC CWnd with the functionalities of a Win32Context.

## Constructor & Destructor Documentation

vlMFC::MFCWindow::MFCWindow | ( |  | ) | `[inline]`

virtual vlMFC::MFCWindow::~MFCWindow | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

bool MFCWindow::initMFCWindow | ( | CWnd * | parent,
|  | MFCWindow * | share_context,
|  | const vl::String & | title,
|  | const vl::OpenGLContextFormat & | fmt,
|  | int | x = `0`,
|  | int | y = `0`,
|  | int | width = `640`,
|  | int | height = `480` |
| ) |  |  |

Creates the window and initializes the OpenGL rendering context.

void MFCWindow::destroy | ( |  | ) | `[virtual]`

calls destroyWindow() and dispatches the destroy event to the UIEventListener objects

Reimplemented from vl::OpenGLContext.

void MFCWindow::destroyWindow | ( |  | ) |

Destroyes the window and the OpenGL rendering context.

HWND vlMFC::MFCWindow::hwnd | ( |  | ) | const`[inline, virtual]`

Returns the Win32 window handle.

Implements vlWin32::Win32Context.

void MFCWindow::OnPaint | ( |  | ) |

void MFCWindow::OnClose | ( |  | ) |

int MFCWindow::OnCreate | ( | LPCREATESTRUCT | lpCreateStruct | ) |

void MFCWindow::OnKeyDown | ( | UINT | nChar,
|  | UINT | nRepCnt,
|  | UINT | nFlags |
| ) |  |  |

void MFCWindow::OnKeyUp | ( | UINT | nChar,
|  | UINT | nRepCnt,
|  | UINT | nFlags |
| ) |  |  |

void MFCWindow::OnLButtonDblClk | ( | UINT | nFlags,
|  | CPoint | point |
| ) |  |  |

void MFCWindow::OnLButtonDown | ( | UINT | nFlags,
|  | CPoint | point |
| ) |  |  |

void MFCWindow::OnLButtonUp | ( | UINT | nFlags,
|  | CPoint | point |
| ) |  |  |

void MFCWindow::OnMButtonDblClk | ( | UINT | nFlags,
|  | CPoint | point |
| ) |  |  |

void MFCWindow::OnMButtonDown | ( | UINT | nFlags,
|  | CPoint | point |
| ) |  |  |

void MFCWindow::OnMButtonUp | ( | UINT | nFlags,
|  | CPoint | point |
| ) |  |  |

void MFCWindow::OnMouseMove | ( | UINT | nFlags,
|  | CPoint | point |
| ) |  |  |

BOOL MFCWindow::OnMouseWheel | ( | UINT | nFlags,
|  | short | zDelta,
|  | CPoint | pt |
| ) |  |  |

void MFCWindow::OnRButtonDblClk | ( | UINT | nFlags,
|  | CPoint | point |
| ) |  |  |

void MFCWindow::OnRButtonDown | ( | UINT | nFlags,
|  | CPoint | point |
| ) |  |  |

void MFCWindow::OnRButtonUp | ( | UINT | nFlags,
|  | CPoint | point |
| ) |  |  |

void MFCWindow::OnSize | ( | UINT | nType,
|  | int | cx,
|  | int | cy |
| ) |  |  |

afx_msg void vlMFC::MFCWindow::OnTimer | ( | UINT_PTR | nIDEvent | ) |

void MFCWindow::OnDropFiles | ( | HDROP | hDropInfo | ) |

void MFCWindow::CountAndCapture | ( |  | ) | `[protected]`

void MFCWindow::CountAndRelease | ( |  | ) | `[protected]`

## Member Data Documentation

int vlMFC::MFCWindow::mMouseDownCount`[protected]`

CString MFCWindow::mClassName`[static, protected]`

The documentation for this class was generated from the following files:

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlMFC/MFCWindow.hpp
- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlMFC/MFCWindow.cpp

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 29 11:11:58 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.