Device.SetDialogBoxesEnabled Method |
Language: |
Enables the use of Microsoft Windows Graphics Device Interface (GDI) dialog boxes in full-screen applications.
Visual Basic Public Sub SetDialogBoxesEnabled( _
ByVal value As Boolean _
)C# public void SetDialogBoxesEnabled(
bool value
);C++ public:
void SetDialogBoxesEnabled(
bool value
);JScript public function SetDialogBoxesEnabled(
value : boolean
);
value System.Boolean
Set to true to enable GDI dialog boxes. Set to false to disable GDI dialog boxes.
The GDI dialog boxes must be created as child elements to the device window. They should also be created within the same thread that created the device, because this enables the parent window to manage redrawing of the child window.
This method has no effect on applications in windowed mode, but its setting takes effect if the application resets the device into full-screen mode. If SetDialogBoxesEnabled succeeds in a windowed-mode application, any subsequent reset to full-screen mode is checked against the restrictions cited above. Also, because SetDialogBoxesEnabled causes all back buffers on the swap chain to be discarded, an application is expected to refresh its content for all back buffers after the call.
Exceptions
InvalidCallException: The method call is invalid. For example, a method's parameter might contain an invalid value.
This method also might fail if the all of the following are conditions are present.
- The application specified a back buffer format compatible with GDI; that is, X1R5G5B5, R5G6B5, or X8R8G8B8.
- The application specified no multisampling.
- The application specified SwapEffect.Discard.
- The application specified PresentFlag.LockableBackBuffer.
- The application did not specify CreateFlags.AdapterGroupDevice.
- The application is not in a BeginScene ... EndScene pair.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center