LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Device Context

I need to get the device context of a CVI panel or canvas indicator (for generic drawing). Is there any way for doing this?
I know I can get the windows handle (generated from the windows API functions) of a CVI panel with the GetPanelAttribute function. Unfortunately this function stores the windows handle to an integer variable. Casting this value to the HWND type is a correct action?
I need this info for a third-party library that prints bar codes.

Thanks
Giovanni
0 Kudos
Message 1 of 2
(2,800 Views)
You can't get a DC for a canvas, but yes, you can cast the integer value that comes back from GetPanelAttribute to an HWND. Then, you can get a DC to that window.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 2
(2,800 Views)