CATIA-CAA CATNavigBox Resize
Question
Is it possible to change the size of the treeview window after it has been visualized?
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 that would indicate that its possible, but CATIA is doing it so there has to be a way. Im using CAAV5 R16.
Solution
I don't know why it didn't work but now i've got it. I'm catching a Resizecallback from the CATDlgContainer
AddAnalyseNotificationCB(this,this->GetResizeNotification(),
(CATCommandMethod)&PROTrvTreeView::OnContainerResizeNotification,
NULL);
The catching method looks like this
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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow