IDirect3D8::GetAdapterMonitor

This method returns the handle of the monitor associated with the Microsoft® Direct3D® object.

HMONITOR GetAdapterMonitor(
  UINT Adapter
);

Parameters

  • Adapter
    [in] Ordinal number that denotes the display adapter. D3DADAPTER_DEFAULT is always the primary display adapter.

Return Values

Handle of the monitor associated with the Direct3D object.

Remarks

As shown in the following code fragment, which illustrates how to obtain a handle to the monitor associated with a given device, use IDirect3DDevice8::GetDirect3D to return the Direct3D enumerator from the device and use IDirect3DDevice8::GetCreationParameters to retrieve the value for Adapter.

    if( FAILED( pDevice->GetCreationParameters(  &Parameters ) ) )
        return E_INVALIDCALL;

    if( FAILED( pDevice->GetDirect3D(&pD3D) ) )
        return E_INVALIDCALL;

    hMonitor = pD3D->GetAdapterMonitor(Parameters.AdapterOrdinal);

    pD3D->Release();

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8.h.
Link Library: D3d8.lib.

See Also

IDirect3DDevice8::GetCreationParameters | IDirect3DDevice8::GetDirect3D | IDirect3D8

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.