11-03-2008 10:39 AM
Hello All,
I'm using the Tool Bar Instrument for the first time and I am not succeeding keeping the tool bar free from "child" windows.
I'd like to have a tool bar in a parent window that is not overlappable by a child window. In other words I'm looking for a situation similar to CVI environment behaviuor, where the "child" windows are blocked below the tool bar and have no chance to overlap it.
Any suggestion?
Thank you
Sergio
Solved! Go to Solution.
11-04-2008 09:04 AM
The CVI IDE window design is slightly different. In your case, you can restrict the child panels from obtruding into the toolbar regions in the panel callback, as follows:
static int CVICALLBACK ChildPanelCallback(int panel, int e, void *cb, int e1, int e2)
{
#define MY_TOOLBAR_HEIGHT 50
if (e == EVENT_PANEL_MOVING || e == EVENT_PANEL_SIZING)
{
Rect r;
GetPanelEventRect(e2, &r);
if (r.top < MY_TOOLBAR_HEIGHT)
{
r.top = MY_TOOLBAR_HEIGHT;
SetPanelEventRect(e2, r);
}
}
return 0;
}