What did Open_window () do?

Source: Internet
Author: User

1Hlong mainwndid=(Hlong) m_hwnd;2Open_framegrabber ("File",4,4,0,0,0,0,"default", -1,"default", -1,"default",3 "","default", -1, -1, &acqhandle);4Grab_image (&Image, acqhandle);5Get_image_pointer1 (image, &pointer, &type, &width, &Height);6Set_window_attr ("Background_color","Black");7Set_window_attr ("Border_color"," White");8 9Open_window (20,140,width,height,mainwndid, "", "", &windowhandle);TenDisp_obj (Image, windowhandle);

The above section of code is to load a bitmap from the file, assorted first, we look at the Open_window () function.

Don't say a word more first

This is the main program window

Here's the point, we use the VS self-tool Spy + + to capture the black part of the program's main window:

Clearly, the black part has a handle: 00310780 is caption: "Halcon/win32-3600" is a class: HALCON not to mention that there is a style, but also occupy a part of the main window.

Yes, that's what Open_window did: create a window!!!!!

As for the window caption we can change it by set_window_attr ().

With this handle, Halcon can do anything with it and draw anything!!!!

OK, here we go!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.