Microsoft Windows CE 3.0  

CBaseWindow Class

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The CBaseWindowclass creates a window and a worker thread. The worker thread pulls messages from the window's input queue and dispatches them as appropriate. The window and its thread are created by the CBaseWindow::PrepareWindowmember function and destroyed by the CBaseWindow::DoneWithWindowmember function. The window should also be initialized by the CBaseWindow::InitialiseWindowmember function and uninitialized by the CBaseWindow::UninitialiseWindowmember function. After preparing and initializing a window, size it by using the CBaseWindow::ActivateWindowmember function; hide the window using the CBaseWindow::InactivateWindowmember function.

Protected Data Members

m_bActivated Flag to indicate window activation status.
m_bBackground Flag to indicate if palettes are to be realized in the background.
m_bDoGetDC Flag to indicate if the window should get a DC.
m_ClassStyles Class styles for the window.
m_hdc Device context (DC) for the window.
m_Height Client window height.
m_hInstance Global module instance handle.
m_hPalette Handle to a palette belonging to this object.
m_hThread Worker thread for the window.
m_hwnd Handle for this object's window.
m_MemoryDC Memory DC used for fast bit-block transfer operations.
m_pClassName Static string holding the class name.
m_RealizePalette Message sent to indicate the window palette has changed.
m_ShowStageMessage Message sent by IVideoWindow::SetWindowForegroundthat moves the current window to the foreground and optionally gives it focus.
m_ShowStageTop Message sent to set the window to WS_EX_TOPMOST style.
m_SyncWorker CAMEventdata member used to provide interthread synchronization.
m_SyncWorkerCreate CAMMsgEventdata member used to signal the constructor for the window class when to create the window.
m_ThreadSignal Data member used by the thread to signal errors.
m_Width Client window width.
m_WindowLock Data member used to serialize window object access.
m_WindowStyles Data member used to serialize the initial window styles.
m_WindowStylesEx Data member used to serialize the initial extended window styles.

Member Functions

CBaseWindow Constructs a CBaseWindowobject.
DoSetWindowForeground Brings the window to the foreground.
DoShowWindow Sets the show state of the specified window.
GetMemoryHDC Retrieves the default offscreen memory device context (DC).
GetWindowHDC Retrieves the default main window DC.
GetWindowHeight Retrieves the current window height.
GetWindowHWND Retrieves the window handle for the window.
GetWindowWidth Retrieves the current window width.
PerformanceAlignWindow Aligns the window to a DWORDboundary for maximum performance.
PaintWindow Invalidates the window client area.

Overridable Member Functions

ActivateWindow Sizes the window according to the requirements of the derived class.
DoneWithWindow Closes, deletes, and frees the window resources.
DoRealisePalette Maps palette entries from this window's palette to the system palette. The window's palette is set with CBaseWindow::SetPalette.
PossiblyEatMessage Forwards keyboard and mouse messages to a specified window.
GetClassWindowStyles Retrieves class and window information.
GetDefaultRect Retrieves the default size for the window.
InactivateWindow Hides the window.
InitialiseWindow Creates the default device contexts.
OnClose Handles the WM_CLOSE message for the base class.
OnPaletteChange Handles WM_PALETTEISCHANGING and WM_PALETTECHANGED messages.
OnSize Handles WM_SIZE messages for the base class.
OnReceiveMessage Indicates a base class implementation of a window procedure.
PrepareWindow Initializes the window along with a worker thread.
SetPalette Changes the palette that the window should realize.
UninitialiseWindow Destroys the device contexts created for the window.