CLOSESCREEN

Top  Previous  Next

Syntax

CLOSESCREEN

Description

Closes a DirectX screen previously created with CREATESCREEN or ATTACHSCREEN

Parameters

None

Return value

None

Remarks

The screen is closed, any allocated buffers are freed, and the primary Windows surface is re-enabled if in full screen mode. You must free all sprites before using this command. DirectX will remain initialized so it is safe to call CREATESCREEN or ATTACHSCREEN again after using this command.

See Also: CREATESCREEN, ATTACHSCREEN

Example usage

CREATESCREEN 800,600,32
FILLSCREEN RGB(155,155,155)
WRITETEXT 0,0,"Press any key to close"
FLIP
WAITKEY
CLOSESCREEN
END