Index

CDTWindow

Open

1 DT_SWORD Open(const DT_CHAR* title, DT_SLONG w, DT_SLONG h, DT_ULONG flags, const DT_STREAM_DESC* sd_menu = DV_NULL)

2 DT_SWORD Open(const DT_CHAR* title, DT_SLONG x, DT_SLONG y, DT_SLONG w, DT_SLONG h, DT_ULONG flags, const DT_STREAM_DESC* sd_menu = DV_NULL

This function opens the window.

Parameters

ParameterDescription

title

A valid pointer to the standard ANSI C/C++ string which represents the title of the window.

x

The x coordinate of the window, in pixels.

y

The y coordinate of the window, in pixels.

w

The width of the window, in pixels.

h

The height of the window, in pixels.

flags

A bitmask of special flags. The following bit values are currently supported:

  • DV_WINDOW_HINT_RESIZE — Indicates that the window should be resizable.
  • DV_WINDOW_HINT_CENTER — When opening the window, attempts to center it on the display. This may not work on all platforms.

Note that flags is a bitmask. Use the OR ("|") operation to combine several bit values. For example, to open a centered and resizable window, set flags to DV_WINDOW_HINT_RESIZE|DV_WINDOW_HINT_CENTER.

Return Value

If the function was successful, the return value is 1. Otherwise, the function returns 0.

 

Index