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.
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.