DXUTSetWindow
Microsoft DirectX 9.0 SDK Update (October 2004)

DXUTSetWindow Function


Sets a previously created window for use by the sample framework.

Syntax

HRESULT DXUTSetWindow(      

    HWND hWndFocus,     HWND hWndDeviceFullScreen,     HWND hWndDeviceWindowed,     BOOL bHandleMessages );

Parameters

hWndFocus
[in] Handle of the Microsoft Direct3D focus window. Must not be NULL.
hWndDeviceFullScreen
[in] Handle of the Direct3D device window when in full-screen mode. Must not be NULL.
hWndDeviceWindowed
[in] Handle of the Direct3D device window when in windowed mode. Must not be NULL.
bHandleMessages
[in] If TRUE, the framework will handle and respond to messages for the window. If FALSE, the framework will not handle messages for the window, giving the application full responsibility for responding to messages.

The default value is TRUE.

Return Value

If the function succeeds, the return value is S_OK.

If the function fails, the return value can be one of the error codes in DXUTERR.

Remarks

This function relies on an existing window object created by the application. Alternately, the application can call DXUTCreateWindow to have the sample framework create a window. If neither DXUTCreateWindow nor DXUTSetWindow has been called before calling a framework device creation method, the framework will automatically call DXUTCreateWindow using the default parameter values.

No input parameter may be NULL. However, the same handle may be used for more than one parameter.

Function Information

Headerdxut.h
Import libraryNone
Minimum operating systems Windows 98

See Also

Using Your Own Window, DXUTCreateWindow


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