ClassesClasses | | Operators

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

dev_get_windowdev_get_windowDevGetWindowDevGetWindow (Operator)

Name

dev_get_windowdev_get_windowDevGetWindowDevGetWindow — Return the handle of the active graphics window.

Signature

dev_get_window( : : : WindowHandle)

Herror dev_get_window(Hlong* WindowHandle)

Herror T_dev_get_window(Htuple* WindowHandle)

void DevGetWindow(HTuple* WindowHandle)

void HWindow::DevGetWindow()

static void HOperatorSet.DevGetWindow(out HTuple windowHandle)

void HWindow.DevGetWindow()

Description

dev_get_windowdev_get_windowDevGetWindowDevGetWindowDevGetWindow returns the window handle of the active graphics window. If currently no graphics window is open, the return value is -1.

Attention

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.

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (output_control)  window HWindow, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Window handle.

Example (HDevelop)

read_image (Image,'mreut')
threshold (Image, Region, 100, 200)
dev_open_window (1, 1, 200, 200, 'black', WindowID1)
dev_open_window (1, 220, 200, 200, 'black', WindowID2)
dev_get_window (CurrentWindowID)
dev_set_window (WindowID1)
dev_set_color ('blue')
dev_display (Image)
dev_display (Region)
dev_set_window(CurrentWindowID)

Result

If the values of the specified parameters are correct, dev_get_windowdev_get_windowDevGetWindowDevGetWindowDevGetWindow returns 2 (H_MSG_TRUE). Otherwise an exception is raised and an error code returned.

Possible Predecessors

dev_close_windowdev_close_windowDevCloseWindowDevCloseWindowDevCloseWindow

Possible Successors

dev_set_windowdev_set_windowDevSetWindowDevSetWindowDevSetWindow

Module

Foundation


ClassesClasses | | Operators