![]() |
![]() |
Returns the handle of the monitor associated with the Direct3D object.
HMONITOR GetAdapterMonitor( UINT Adapter );
Handle of the monitor associated with the Direct3D object.
As shown in the following code fragment, which illustrates how to obtain a handle to the monitor associated with a given device, use IDirect3DDevice9::GetDirect3D to return the Direct3D enumerator from the device and use IDirect3DDevice9::GetCreationParameters to retrieve the value for Adapter.
if( FAILED( pDevice->GetCreationParameters( &Parameters ) ) ) return D3DERR_INVALIDCALL; if( FAILED( pDevice->GetDirect3D(&pD3D) ) ) return D3DERR_INVALIDCALL; hMonitor = pD3D->GetAdapterMonitor(Parameters.AdapterOrdinal); pD3D->Release();
Header: Declared in D3d9.h.
IDirect3DDevice9::GetCreationParameters, IDirect3DDevice9::GetDirect3D