CATIA-CAA CATNavigBox Resize
Is it possible to resize the treeview window after rendering it?
My code looks like this:
_p2DNavViewer = NULL;
_p2DNavViewer = new CATNavigation2DViewer(this, "", CATDlgFraNoTitle | CATDlgWndNoDecoration |CATDlgWndChildMDI |CATDlgFraNoFrame, _width, _height);
_pNavigBox = new CATNavigBox(this, "", NULL, Indented, "CATINavigateObject_ForCAA2", 0, 0, _p2DNavViewer);
this is the surrounding CATDlgContainer.
I can't find anything to show that its possible, but CATIA does, so there must be a way. Im using CAAV5 R16.
+1
source to share
1 answer
I don't know why it didn't work, but now I have it. I will catch Resizecallback from CATDlgContainer
AddAnalyseNotificationCB(this,this->GetResizeNotification(),
(CATCommandMethod)&PROTrvTreeView::OnContainerResizeNotification,
NULL);
The fishing method is as follows
void PROTrvTreeView::OnContainerResizeNotification(CATCommand* cmd,
CATNotification* evt, CATCommandClientData data) {
DRECT * pRect = new DRECT();
GetRectDimensions(pRect);
if (pRect != NULL) {
_p2DNavViewer->SetRectDimensions(pRect->x,pRect->y, pRect->dy, pRect->dx);
}
delete pRect;
pRect = NULL;
}
So it was _p2DNavViewer-> SetRectDimensions all along
+1
source to share