Microsoft DirectX 8.1 (C++)

CBaseWindow Class

The CBaseWindow class is a base class for managing windows. Video renderers can use this class to create video windows.

To use this class, create a derived class that inherits from CBaseWindow. In the derived class:

Before using an instance of the derived class, call the CBaseWindow::PrepareWindow method.

Requirements

Header: Declared in Winutil.h; include Streams.h.

Library: Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

Protected Member Variables  
m_hInstance Handle to the module instance.
m_hwnd Handle to the object's window.
m_hdc Handle to the window's device context.
m_Width Width of the client area, in pixels.
m_Height Height of the client area, in pixels.
m_bActivated Flag that specifies whether the window has been activated.
m_pClassName Static string that contains the name of the window class.
m_ClassStyles Class styles for the window.
m_WindowStyles Window styles for the window.
m_WindowStylesEx Extended window styles for the window.
m_ShowStageMessage Private message that brings the window to the foreground.
m_ShowStageTop Private message that sets the window style to WS_EX_TOPMOST.
m_RealizePalette Private message that realizes the palette.
m_MemoryDC Handle to the memory device context.
m_hPalette Handle to the window's palette.
m_bNoRealize Flag that specifies whether the window should realize its palette.
m_bBackground Flag that specifies whether the palette should be a background palette.
m_bRealizing Flag that specifies whether a new palette is being realized.
m_WindowLock Critical section, to serialize access to the object.
m_bDoGetDC Flag that specifies whether to retrieve the device context.
m_bDoPostToDestroy Flag that specifies whether the window posts or sends its destruction message.
Protected Methods  
OnPaletteChange Handles palette-change messages. Virtual.
Public Methods  
CBaseWindow Constructor method.
DoneWithWindow Destroys the window. Virtual.
PrepareWindow Creates the window. Virtual.
InactivateWindow Inactivates the window. Virtual.
ActivateWindow Sizes the window according to the requirements of the derived class. Virtual.
OnSize Handles WM_SIZE messages. Virtual.
OnClose Handles WM_CLOSE messages. Virtual.
GetDefaultRect Retrieves the default size of the client area. Virtual.
UninitialiseWindow Releases the window's resources. Virtual.
InitialiseWindow Initializes the window. Virtual.
CompleteConnect Notifies the window that the renderer's input pin has been connected.
DoCreateWindow Creates the window.
PerformanceAlignWindow Aligns the window to a DWORD boundary, for maximum performance.
DoShowWindow Sets the window's show state.
PaintWindow Causes the window to be repainted.
DoSetWindowForeground Brings the window to the foreground.
SetPalette Installs a palette for the window. Virtual.
SetRealize Specifies whether the window realizes palettes.
DoRealisePalette Realizes the window's current palette. Virtual.
PossiblyEatMessage Enables a derived class to forward messages to another window. Virtual.
GetWindowWidth Retrieves the current width of the window.
GetWindowHeight Retrieves the current height of the window.
GetWindowHWND Retrieves a handle to the window.
GetMemoryHDC Retrieves a handle to the memory device context.
GetWindowHDC Retrieves a handle to the window's device context.
OnReceiveMessage Handles window messages. Virtual.
Pure Virtual Methods  
GetClassWindowStyles Retrieves the window's class styles and window styles.