Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

dev_close_windowdev_close_windowDevCloseWindowDevCloseWindow (Operator)


dev_close_windowdev_close_windowDevCloseWindowDevCloseWindow — Close the active graphics window.


dev_close_window( : : : )

Herror dev_close_window()

Herror T_dev_close_window()

void DevCloseWindow()

static void HWindow::DevCloseWindow()

static void HOperatorSet.DevCloseWindow()

static void HWindow.DevCloseWindow()


dev_close_windowdev_close_windowDevCloseWindowDevCloseWindowDevCloseWindow closes the active graphics window which has been opened by dev_open_windowdev_open_windowDevOpenWindowDevOpenWindowDevOpenWindow, a suitable menu entry, or automatically by HDevelop itself at program start or after loading a new program (default window).

The operator is equivalent to pressing the Close button in the title bar of the active window or selecting the appropriate menu entry from the visualization menu.

A graphics window can be activated by calling dev_set_windowdev_set_windowDevSetWindowDevSetWindowDevSetWindow or by pressing the Activate button in the tool bar of the selected graphics window.


Using the code export feature of HDevelop, the code that is generated for this operator may have a different behavior than the related HALCON operator. For a detailed description of the code export of HDevelop graphics operators into the different programming languages see in the “HDevelop User's Guide” the chapter Code Export -> General Aspects of Code Generation -> Graphics Windows.

Example (HDevelop)

* close all windows
for i := 1 to 10 by 1
  dev_close_window ()
read_image (For5, 'for5')
get_image_size (For5, Width, Height)
dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
dev_display (For5)


dev_close_windowdev_close_windowDevCloseWindowDevCloseWindowDevCloseWindow returns always 2 (H_MSG_TRUE).

Possible Predecessors

dev_set_windowdev_set_windowDevSetWindowDevSetWindowDevSetWindow, dev_open_windowdev_open_windowDevOpenWindowDevOpenWindowDevOpenWindow

Possible Successors

dev_open_windowdev_open_windowDevOpenWindowDevOpenWindowDevOpenWindow, dev_get_windowdev_get_windowDevGetWindowDevGetWindowDevGetWindow

See also