LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Display images with HWND

Is it possible to display images in a window or any other control that has a Windows HWND other than one generated by imaqGetSystemWindowHandle and imaqGetWindowHandle.

Thanks,
Mark Oberg
0 Kudos
Message 1 of 4
(4,447 Views)
Hi Mark,

It's my understanding that all windows will have a message window identifier, and that these two functions will return that window number, so there can be no window that doesn't return a windows handle.

Please respond back with more information.  I might be able to help you further if I get more details about what you are trying to accomplish.
Regards,
Brandon M.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,427 Views)
I am trying to display an image buffer in a window that is NOT generated by the imaq Display functions.  So if I created a different window in C++ and used the HWND of that window to use as the display, how would I do that?

Thanks,
Mark
0 Kudos
Message 3 of 4
(4,404 Views)
Hi Mark,

in an actual project i'm working with a ueye digital camera. With this
camera i got a sdk that i can use within cvi.
To display the captured image in a cvi window, i first get the HWND:

GetPanelAttribute (videoPanel, ATTR_SYSTEM_WINDOW_HANDLE, (int*) &hWnd);

Than i use the SDK function to display the image in this window:

is_RenderBitmap(hf, 2, hWnd, IS_RENDER_FIT_TO_WINDOW);

In an other project with a canon digital stills camera i just receive the
image buffer from the camera and than draw the image to a canvas on a cvi
panel:

error = CanvasDrawBitmap (viewfinder.handle, viewfinder.canvas, bmp.ID,
VAL_ENTIRE_OBJECT, VAL_ENTIRE_OBJECT);

Hope this helps.....

Norbert Rieper
Bremerhaven
Germany



"MarkOberg" <x@no.email> schrieb im Newsbeitrag
news:1188317424567-571842@exchange.ni.com...
>I am trying to display an image buffer in a window that is NOT generated by
>the imaq Display functions.&nbsp; So if I created a different window in C++
>and used the HWND of that window to use as the display, how would I do
>that? Thanks,Mark


0 Kudos
Message 4 of 4
(4,390 Views)