LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make (imaq) IMAGE WINDOW appear inside a Parent->Child->Child Panel

Hi Good day, I am using LABWindows/cvi 8.5 with IMAQ Vision 6.0. I created an IMAQ image window to display my image and i want it to lie inside a child child panel.

 

Here's how it look like for the parent and child panel

 

//Note the parent panel is in my main application and the below function is being called as a DLL.

 

void ExecuteMainDlg (int ParentPanel)
{

 

   if ((panelMainDlg = LoadPanelEx (ParentPanel, "MainDlg.uir", MAINDLG, __CVIUserHInst)) >= 0)
   {  
       panelActWldDlg = LoadPanelEx (panelMainDlg, "MainDlg.uir", ACTWLDDLG, __CVIUserHInst);
   }
 

   //****************************************************************************

   //The below line doesn't work if i want to make the Image Window lie on the panelActWldgDlg

      GetPanelAttribute (panelActWldDlg , ATTR_SYSTEM_WINDOW_HANDLE, &ParentWndHdl);
      SystemWndHdl  = (int) imaqGetSystemWindowHandle(sWindowHandle);
      SetParent ((HWND) SystemWndHdl, (HWND) ParentWndHdl);   

 

  //******************************************************************************


}

 

0 Kudos
Message 1 of 3
(3,412 Views)

unfortunately, only top level windows have a valid system window handle when using the CVI User Interface library. this means that you can't make the image window a child of a child panel.

 

you can however make it a child of a top level panel. this has already been discussed in this forum (i can't find the specific thread which showed the code to do it) using about the same functions calls you used in your sample.

0 Kudos
Message 2 of 3
(3,403 Views)

Thanks for this quick responds. But i still believe there's a way to place an Image Window inside the parent->child(dll)->child panel. Do you know how to get the panel ID of a Parent->child(called from a .DLL)->child panel?

 

where

 

Parent panel calls a panel from a .dll (which makes it as a child window) that child panel has a child of its own. how can i get the parent->child->child panel ID?

 

Thanks.

0 Kudos
Message 3 of 3
(3,381 Views)