CBaseWindow.GetClassWindowStyles method

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The GetClassWindowStyles method retrieves the window's class styles and window styles.

Syntax

virtual LPTSTR GetClassWindowStyles(
   DWORD *pClassStyles,
   DWORD *pWindowStyles,
   DWORD *pWindowStylesEx
) = 0;

Parameters

pClassStyles

Pointer to a variable that receives the class styles.

pWindowStyles

Pointer to a variable that receives the window styles.

pWindowStylesEx

Pointer to a variable that receives the extended window styles.

Return value

Returns a static text string that contains the class name.

Remarks

The CBaseWindow::PrepareWindow method calls this method to retrieve the window's class styles and window styles.

This method is pure virtual; the derived class must implement it. The following example shows a possible implementation:

LPTSTR CMyWindowClass::GetClassWindowStyles(DWORD *pClassStyles,
                                            DWORD *pWindowStyles,
                                            DWORD *pWindowStylesEx)
{
    *pClassStyles = CS_HREDRAW | CS_VREDRAW;
    *pWindowStyles = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN;
    *pWindowStylesEx = WS_EX_WINDOWEDGE;
    return TEXT("MyWindowClass");
}

The object uses the class style for the lpszClassName member of a WNDCLASS structure, which it passes to the RegisterClass function. The object uses the window styles for the dwExStyle and dwStyle parameters of the CreateWindowEx function. For more information, see the Platform SDK.

Requirements

Requirement Value
Header
Winutil.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CBaseWindow Class