Skip to content

set_window_dcSetWindowDcSetWindowDcset_window_dcT_set_window_dc🔗

Short description🔗

set_window_dcSetWindowDcSetWindowDcset_window_dcT_set_window_dc — Set the device context of a virtual graphics window (Windows NT).

Signature🔗

set_window_dc( window WindowHandle, pointer WINHDC )void SetWindowDc( const HTuple& WindowHandle, const HTuple& WINHDC )static void HOperatorSet.SetWindowDc( HTuple windowHandle, HTuple WINHDC )def set_window_dc( window_handle: HHandle, winhdc: int ) -> None

Herror T_set_window_dc( const Htuple WindowHandle, const Htuple WINHDC )

void HWindow::SetWindowDc( void* WINHDC ) const

void HWindow.SetWindowDc( IntPtr WINHDC )

Description🔗

set_window_dcSetWindowDc sets the device context of a window previously opened with new_extern_windowNewExternWindow. All output (disp_regionDispRegion, disp_imageDispImage, etc.) is done in the window with this device context.

The parameter WINHDCWINHDCwinhdc contains the device context of the window in which HALCON should output its data. This device context is used in all output routines of HALCON.

Attention🔗

The window WindowHandlewindowHandlewindow_handle has to be created with new_extern_windowNewExternWindow beforehand.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

WINHDCWINHDCwinhdc (input_control) pointer → (integer)HTuple (Hlong)HTuple (IntPtr)intHtuple (Hlong)

device context of WINHWnd.

Restriction: WINHDC != 0

Result🔗

If the values of the specified parameters are correct, set_window_dcSetWindowDc returns 2 (H_MSG_TRUE). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

new_extern_windowNewExternWindow

Possible successors

disp_imageDispImage, disp_regionDispRegion

See also

new_extern_windowNewExternWindow, disp_regionDispRegion, disp_imageDispImage, disp_colorDispColor, set_lutSetLut, query_colorQueryColor, set_colorSetColor, set_rgbSetRgb, set_hsiSetHsi, set_pixelSetPixel, set_graySetGray, set_partSetPart, set_part_styleSetPartStyle, query_window_typeQueryWindowType, get_window_typeGetWindowType, set_window_typeSetWindowType, get_mpositionGetMposition, set_tpositionSetTposition, set_window_extentsSetWindowExtents, get_window_extentsGetWindowExtents, set_window_attrSetWindowAttr, set_checkSetCheck, set_systemSetSystem

Module🔗

Foundation