Applications use the methods of the IDirect3DRMWinDevice interface to respond to window messages in a window procedure. This section is a reference to the methods of this interface. For a conceptual overview, see Window Management.
The IDirect3DRMWinDevice interface supports the following methods:
HandleActivate |
HandlePaint |
The IDirect3DRMWinDevice interface, like all Component Object Model (COM) interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:
AddRef |
QueryInterface |
Release |
The Direct3DRMWinDevice object is obtained by calling the IDirect3DRMObject::QueryInterface method and specifying IID_IDirect3DRMWinDevice, or by calling a method such as IDirect3DRM3::CreateDeviceFromD3D. The IDirect3DRMWinDevice methods are inherited from the IDirect3DRMDevice3 interface.
Responds to a Microsoft® Windows®w WM_ACTIVATE message. This ensures that the colors are correct in the active rendering window.
Syntax
HRESULT HandleActivate(
WORD wParam
);
Parameters
- wParam
- WPARAM parameter passed to the message-processing procedure with the WM_ACTIVATE message.
Return Value
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Responds to a Windows WM_PAINT message. The hDC parameter should be taken from the PAINTSTRUCT structure given to the Windows BeginPaint function. This method should be called before repainting any application areas in the window because it may repaint areas outside the viewports that have been created on the device.
Syntax
HRESULT HandlePaint(
HDC hDC
);
Parameters
- hDC
- Handle of the device context (DC).
Return Value
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Top of Page
© 1999 Microsoft and/or its suppliers. All rights reserved. Terms of Use.