set_window_dcT_set_window_dcSetWindowDcSetWindowDcset_window_dc (算子)

名称

set_window_dcT_set_window_dcSetWindowDcSetWindowDcset_window_dc — 设置虚拟图形窗口(Windows NT)的设备上下文。

签名

set_window_dc( : : WindowHandle, WINHDC : )

Herror T_set_window_dc(const Htuple WindowHandle, const Htuple WINHDC)

void SetWindowDc(const HTuple& WindowHandle, const HTuple& WINHDC)

void HWindow::SetWindowDc(void* WINHDC) const

static void HOperatorSet.SetWindowDc(HTuple windowHandle, HTuple WINHDC)

void HWindow.SetWindowDc(IntPtr WINHDC)

def set_window_dc(window_handle: HHandle, winhdc: int) -> None

描述

set_window_dcset_window_dcSetWindowDcSetWindowDcSetWindowDcset_window_dc sets the device context of a window previously opened with new_extern_windownew_extern_windowNewExternWindowNewExternWindowNewExternWindownew_extern_window。All output (disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region, disp_imagedisp_imageDispImageDispImageDispImagedisp_image, etc.) is done in the window with this device context.

The parameter WINHDCWINHDCWINHDCWINHDCWINHDCwinhdc 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.

注意

The window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle has to be created with new_extern_windownew_extern_windowNewExternWindowNewExternWindowNewExternWindownew_extern_window beforehand.

执行信息

参数

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

窗口句柄。

WINHDCWINHDCWINHDCWINHDCWINHDCwinhdc (输入控制)  pointer HTupleintHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

device context of WINHWnd.

限制: WINHDC != 0

结果

If the values of the specified parameters are correct, set_window_dcset_window_dcSetWindowDcSetWindowDcSetWindowDcset_window_dc 返回 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

new_extern_windownew_extern_windowNewExternWindowNewExternWindowNewExternWindownew_extern_window

可能的后继

disp_imagedisp_imageDispImageDispImageDispImagedisp_image, disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region

另见

new_extern_windownew_extern_windowNewExternWindowNewExternWindowNewExternWindownew_extern_window, disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region, disp_imagedisp_imageDispImageDispImageDispImagedisp_image, disp_colordisp_colorDispColorDispColorDispColordisp_color, set_lutset_lutSetLutSetLutSetLutset_lut, query_colorquery_colorQueryColorQueryColorQueryColorquery_color, set_colorset_colorSetColorSetColorSetColorset_color, set_rgbset_rgbSetRgbSetRgbSetRgbset_rgb, set_hsiset_hsiSetHsiSetHsiSetHsiset_hsi, set_pixelset_pixelSetPixelSetPixelSetPixelset_pixel, set_grayset_graySetGraySetGraySetGrayset_gray, set_partset_partSetPartSetPartSetPartset_part, set_part_styleset_part_styleSetPartStyleSetPartStyleSetPartStyleset_part_style, query_window_typequery_window_typeQueryWindowTypeQueryWindowTypeQueryWindowTypequery_window_type, get_window_typeget_window_typeGetWindowTypeGetWindowTypeGetWindowTypeget_window_type, set_window_typeset_window_typeSetWindowTypeSetWindowTypeSetWindowTypeset_window_type, get_mpositionget_mpositionGetMpositionGetMpositionGetMpositionget_mposition, set_tpositionset_tpositionSetTpositionSetTpositionSetTpositionset_tposition, set_window_extentsset_window_extentsSetWindowExtentsSetWindowExtentsSetWindowExtentsset_window_extents, get_window_extentsget_window_extentsGetWindowExtentsGetWindowExtentsGetWindowExtentsget_window_extents, set_window_attrset_window_attrSetWindowAttrSetWindowAttrSetWindowAttrset_window_attr, set_checkset_checkSetCheckSetCheckSetCheckset_check, set_systemset_systemSetSystemSetSystemSetSystemset_system

模块

基础