[Solved] HALCON error #5190: Invalid window parameter

There are two types of window operations in Halcon:

1. dev_open_window opens the entity’s form and displays the image

2. open_window opens a virtual form, which is actually an image into the cache

  1. * See the official routine advanced_visualization_settings.hdev
  2. dev_close_window()
  3.  dev_open_window ( 0, 0, 512, 512, ‘black’, WindowHandle)
  4.  set_window_param (WindowHandle, ‘graphics_stack’, ‘true’) //default value: ‘false’
  5.  set_window_param(WindowHandle, ‘flush’, ‘false’) //default value: ‘true’

In my C++ project, I encountered this problem. When the SetWindowParam function is executed, an exception is always reported:

HALCON error #5190: Invalid window parameter

The solution is as follows:
The SetWindowParam function needs to rely on the dynamic library file hcanvas.dll, and copy the library from
C:\Program Files\MVTec\HALCON-xxx\bin\x64-win64
to your own project path.

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *