DXUTSetWindow

Sets a previously created window for use by DXUT.

HRESULT DXUTSetWindow(
  HWND hWndFocus,
  HWND hWndDeviceFullScreen,
  HWND hWndDeviceWindowed,
  BOOL bHandleMessages
);

Parameters

hWndFocus
[in] Handle of the 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 Values

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 DXUT 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.

Requirements

Header: Declared in Dxut.h.

See Also

DXUTCreateWindow