Set the device context of a virtual graphics window (Windows NT).
set_window_dc sets the device context of a window previously opened with new_extern_window. All output (disp_region, disp_image, etc.) is done in the window with this device context.
The parameter WINHDC 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 WindowHandle has to be created with new_extern_window beforehand.
|
WindowHandle (input_control) |
window -> integer |
| Window identifier. | |
|
WINHDC (input_control) |
integer -> integer |
| devicecontext of WINHWnd. | |
| Restriction: WINHDC != 0 | |
hWnd = createWINDOW(...) new_extern_window(hwnd, hdc, 0,0,400,-1,WindowHandle) set_device_context(WindowHandle, hdc) read_image(Image,'fabrik') disp_image(Image,WindowHandle) write_string(WindowHandle,'File, fabrik.ima') new_line(WindowHandle) get_mbutton(WindowHandle,_,_,_) set_lut(WindowHandle,'temperature') set_color(WindowHandle,'blue') write_string(WindowHandle,'temperature') new_line(WindowHandle) write_string(WindowHandle,'Draw Rectangle') new_line(WindowHandle) draw_rectangle1(WindowHandle,Row1,Column1,Row2,Column2) set_part(Row1,Column1,Row2,Column2) disp_image(Image,WindowHandle) new_line(WindowHandle).
If the values of the specified parameters are correct, set_window_dc returns 2 (H_MSG_TRUE). If necessary, an exception is raised.
set_window_dc is reentrant, local, and processed without parallelization.
new_extern_window, disp_region, disp_image, disp_color, set_lut, query_color, set_color, set_rgb, set_hsi, set_pixel, set_gray, set_part, set_part_style, query_window_type, get_window_type, set_window_type, get_mposition, set_tposition, set_window_extents, get_window_extents, set_window_attr, set_check, set_system
System