CBaseWindow.CBaseWindow constructor
[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.]
Constructor method.
Syntax
CBaseWindow(
BOOL bDoGetDC = TRUE,
BOOL bPostToDestroy = FALSE
);
Parameters
-
bDoGetDC
-
Boolean value that specifies whether to retrieve the device context.
-
bPostToDestroy
-
Boolean value that specifies the CBaseWindow::m_bDoPostToDestroy member variable.
Remarks
After you create the object, call the CBaseWindow::PrepareWindow method to create the window. PrepareWindow is a virtual method. It calls CBaseWindow::InitialiseWindow, also a virtual method. These methods are separated from the constructor so that derived classes can override them, if necessary.
If the value of the bDoGetDC parameter is TRUE, the CBaseWindow
object retrieves a handle to the window's device context (DC) and stores it in the CBaseWindow::m_hdc member variable. The object also creates a compatible memory DC, which it stores in the CBaseWindow::m_MemoryDC member variable. These actions occur in the InitialiseWindow method.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|