LPDXUTCALLBACKISDEVICEACCEPTABLE
Microsoft DirectX 9.0 SDK Update (October 2004)

LPDXUTCALLBACKISDEVICEACCEPTABLE Prototype


Application-defined callback function, called by the sample framework to build an enumerated list of all possible devices. The framework then selects the best device for creation among this list. This callback function allows the application to prevent unwanted devices from being added to the list.

Syntax

typedef bool (CALLBACK *LPDXUTCALLBACKISDEVICEACCEPTABLE)(      

    D3DCAPS9 *pCaps,     D3DFORMAT AdapterFormat,     D3DFORMAT BackBufferFormat,     bool bWindowed );

Parameters

pCaps
[in] D3DCAPS9 structure of the device.
AdapterFormat
[in] Adapter surface format. See D3DFORMAT.
BackBufferFormat
[in] Back buffer format. See D3DPRESENT_PARAMETERS.BackBufferFormat.
bWindowed
[in] Indicates windowed mode. TRUE if the application runs windowed; FALSE if the application runs full-screen. See D3DPRESENT_PARAMETERS.Windowed.

Return Value

Program the application to return TRUE if the device settings are acceptable. If not, the application should return FALSE.

Remarks

This function's parameters describe a set of unique valid device settings that could be used to create a device. The application can examine and reject this set if desired.

All possible unique valid combinations of the following device settings are sent to this callback function:

After the application rejects the unwanted device settings combinations, the sample framework picks the best of the remaining combinations and uses that best combination to create the device. Before creating the device, the framework calls LPDXUTCALLBACKMODIFYDEVICESETTINGS to allow the application to change any of the device creation settings.

Prototype Information

Headerdxut.h
Import libraryNone
Minimum operating systems Windows 98

See Also

Choosing the Best Device Settings, Controlling the Device Selection Dialog


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.