09-05-2008 08:16 AM
09-08-2008 03:23 AM
Yes there is:
Check out my general purpose function below. hPARENTPanel is the UIR panel to dock to.
// UIInitImaqWindow
void UIInitImaqWindow(int *Window,char *Title,int l,int t,int w,int h)
{
const RGBValue c={255,255,0,0};
Point p;
int imaqHandle;
if(*Window==-1)
{
// Set IMAQ Window Parent
if(imaqGetWindowHandle(Window)!=0)
{
imaqHandle=(int)imaqGetSystemWindowHandle(*Window);
SetParent((HWND)imaqHandle,(HWND)hPARENTPanel);
}
imaqSetWindowBackground(*Window,IMAQ_FILL_STYLE_SOLID,IMAQ_HATCH_STYLE_HORIZONTAL,&c,&c);
}
// IMAQ_WIND_CLOSEABLE
// IMAQ_WIND_TOPMOST
// Setup IMAQ Window
if((Title!=NULL)&&(strlen(Title)>0))
{
imaqSetWindowTitle(*Window,Title);
imaqSetupWindow(*Window,IMAQ_WIND_RESIZABLE|IMAQ_WIND_TITLEBAR);
}
else
imaqSetupWindow(*Window,0);
p=imaqMakePoint(l,t);
imaqMoveWindow(*Window,p); // Move IMAQ Window
imaqSetWindowSize(*Window,w,h); // Set IMAQ Window Size
}