Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Queries the device to determine whether the specified adapter supports the requested format and display mode. This method could be used in a loop to enumerate all the available adapter modes.
HRESULT EnumAdapterModes(
[in] UINT Adapter,
[in] D3DFORMAT Format,
[in] UINT Mode,
[out] D3DDISPLAYMODE *pMode
);
[in] Adapter
Type: UINT
Ordinal number denoting the display adapter to enumerate. D3DADAPTER_DEFAULT is always the primary display adapter. This method returns D3DERR_INVALIDCALL when this value equals or exceeds the number of display adapters in the system.
[in] Format
Type: D3DFORMAT
Allowable pixel formats. See Remarks.
[in] Mode
Type: UINT
Represents the display-mode index which is an unsigned integer between zero and the value returned by GetAdapterModeCount minus one.
[out] pMode
Type: D3DDISPLAYMODE*
A pointer to the available display mode of type D3DDISPLAYMODE. See Remarks.
Type: HRESULT
An application supplies a display mode and a format to EnumAdapterModes which returns a display mode. This method could be used in a loop to enumerate all available display modes.
The application specifies a format and the enumeration is restricted to those display modes that exactly match the format (alpha is ignored). Allowed formats (which are members of D3DFORMAT) are as follows:
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d9.h (include D3D9.h) |
Library | D3D9.lib |
Please sign in to use this experience.
Sign in