# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Static Protected Attributes

# vlWin32::Win32Window Class Reference

The Win32Window class is a Win32Context that can be used as a top or child window. More...

`#include <Win32Window.hpp>`

Inheritance diagram for vlWin32::Win32Window:

List of all members.

## Public Member Functions

| Win32Window ()
| ~Win32Window ()
bool | initWin32GLWindow (HWND parent, HGLRC share_context, const vl::String &title, const vl::OpenGLContextFormat &fmt, int x=0, int y=0, int width=640, int height=480)
| Initializes a new Win32 window with a new OpenGL rendering context.
void | destroyWin32GLWindow ()
| Destroys the window and the OpenGL rendering context.
HWND | hwnd () const
DWORD | style () const
| The dwExStyle parameter passed to the Win32 function CreateWindowEx.
void | setStyle (DWORD style)
| The dwExStyle parameter passed to the Win32 function CreateWindowEx.
DWORD | exStyle () const
| The dwStyle parameter passed to the Win32 function CreateWindowEx.
void | setExStyle (DWORD ex_style)
| The dwStyle parameter passed to the Win32 function CreateWindowEx.
const wchar_t * | windowClassName () const
| Specifies the value given to the lpClassName parameter passed to CreateWindowEx.
void | setWindowClassName (const wchar_t *name)
| Specifies the value given to the lpClassName parameter passed to CreateWindowEx.

## Static Public Member Functions

static LONG WINAPI | WindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static Win32Window * | getWindow (HWND hWnd)
| Returns when a WM_QUIT message is sent or when no more windows are alive.
static const std::map< HWND, Win32Window * > & | winMap ()

## Static Public Attributes

static const wchar_t * | Win32WindowClassName = "VisualizationLibraryWindowClass"

## Protected Attributes

int | mMouseDownCount
HWND | mHWND
DWORD | mStyle
DWORD | mExStyle
const wchar_t * | mWindowClassName

## Static Protected Attributes

static std::map< HWND, Win32Window * > | mWinMap

## Detailed Description

The Win32Window class is a Win32Context that can be used as a top or child window.

Definition at line 51 of file Win32Window.hpp.

## Constructor & Destructor Documentation

Win32Window::Win32Window | ( | ) |

Definition at line 252 of file Win32Window.cpp.

Win32Window::~Win32Window | ( | ) |

Definition at line 264 of file Win32Window.cpp.

## Member Function Documentation

LONG WINAPI Win32Window::WindowProc | ( | HWND | hWnd,
|  | UINT | uMsg,
|  | WPARAM | wParam,
|  | LPARAM | lParam
| ) |  | `[static]`

Definition at line 103 of file Win32Window.cpp.

References destroyWin32GLWindow(), vl::OpenGLContext::dispatchDestroyEvent(), vl::OpenGLContext::dispatchFileDroppedEvent(), vl::OpenGLContext::dispatchKeyPressEvent(), vl::OpenGLContext::dispatchKeyReleaseEvent(), vl::OpenGLContext::dispatchMouseDownEvent(), vl::OpenGLContext::dispatchMouseMoveEvent(), vl::OpenGLContext::dispatchMouseUpEvent(), vl::OpenGLContext::dispatchMouseWheelEvent(), vl::OpenGLContext::dispatchResizeEvent(), vl::OpenGLContext::dispatchRunEvent(), vlWin32::Win32Context::hdc(), vlWin32::Win32Context::hglrc(), hwnd(), vl::Key_None, vl::LeftButton, vl::MiddleButton, mMouseDownCount, vl::OpenGLContext::renderTarget(), vl::RightButton, vl::RenderTarget::setHeight(), vl::RenderTarget::setWidth(), vlWin32::translateKeyEvent(), and vl::UnknownButton.

bool Win32Window::initWin32GLWindow | ( | HWND | parent,
|  | HGLRC | share_context,
|  | const vl::String & | title,
|  | const vl::OpenGLContextFormat & | fmt,
|  | int | x = `0`,
|  | int | y = `0`,
|  | int | width = `640`,
|  | int | height = `480`
| ) |  |

Initializes a new Win32 window with a new OpenGL rendering context.

After the initialization to show the window use the show() method.

Definition at line 269 of file Win32Window.cpp.

void Win32Window::destroyWin32GLWindow | ( | ) |

Destroys the window and the OpenGL rendering context.

Definition at line 305 of file Win32Window.cpp.

Referenced by WindowProc().

HWND vlWin32::Win32Window::hwnd | ( | ) | const`[inline, virtual]`

Implements vlWin32::Win32Context.

Definition at line 68 of file Win32Window.hpp.

Referenced by WindowProc().

DWORD vlWin32::Win32Window::style | ( | ) | const`[inline]`

The dwExStyle parameter passed to the Win32 function CreateWindowEx.

Definition at line 71 of file Win32Window.hpp.

void vlWin32::Win32Window::setStyle | ( | DWORD | style ) | `[inline]`

The dwExStyle parameter passed to the Win32 function CreateWindowEx.

Definition at line 74 of file Win32Window.hpp.

DWORD vlWin32::Win32Window::exStyle | ( | ) | const`[inline]`

The dwStyle parameter passed to the Win32 function CreateWindowEx.

Definition at line 77 of file Win32Window.hpp.

void vlWin32::Win32Window::setExStyle | ( | DWORD | ex_style ) | `[inline]`

The dwStyle parameter passed to the Win32 function CreateWindowEx.

Definition at line 80 of file Win32Window.hpp.

const wchar_t* vlWin32::Win32Window::windowClassName | ( | ) | const`[inline]`

Specifies the value given to the lpClassName parameter passed to CreateWindowEx.

Definition at line 83 of file Win32Window.hpp.

void vlWin32::Win32Window::setWindowClassName | ( | const wchar_t * | name ) | `[inline]`

Specifies the value given to the lpClassName parameter passed to CreateWindowEx.

Definition at line 86 of file Win32Window.hpp.

Win32Window * Win32Window::getWindow | ( | HWND | hWnd ) | `[static]`

Returns when a WM_QUIT message is sent or when no more windows are alive.

Definition at line 296 of file Win32Window.cpp.

static const std::map< HWND, Win32Window* >& vlWin32::Win32Window::winMap | ( | ) | `[inline, static]`

Definition at line 100 of file Win32Window.hpp.

## Member Data Documentation

const wchar_t * Win32Window::Win32WindowClassName = "VisualizationLibraryWindowClass"`[static]`

Definition at line 54 of file Win32Window.hpp.

int vlWin32::Win32Window::mMouseDownCount`[protected]`

Definition at line 89 of file Win32Window.hpp.

Referenced by WindowProc().

HWND vlWin32::Win32Window::mHWND`[protected]`

Definition at line 90 of file Win32Window.hpp.

DWORD vlWin32::Win32Window::mStyle`[protected]`

Definition at line 91 of file Win32Window.hpp.

DWORD vlWin32::Win32Window::mExStyle`[protected]`

Definition at line 92 of file Win32Window.hpp.

const wchar_t* vlWin32::Win32Window::mWindowClassName`[protected]`

Definition at line 93 of file Win32Window.hpp.

std::map< HWND, Win32Window * > Win32Window::mWinMap`[static, protected]`

Definition at line 103 of file Win32Window.hpp.

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlWin32/Win32Window.hpp
- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlWin32/Win32Window.cpp

Visualization Library v2011.05.1142 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu May 26 2011 22:51:48.
Permission is granted to use this page to write and publish articles regarding Visualization Library.