Hi All
I have a problem. I want somebody who knows toolkit well to advise me something to do.
in toolkit there are several functions to close the document and its window ProWindowCurrentSet() ProWindowCurrentClose() ProMdlEraseAll().
toolkit offers you to use them to close part assembly drawing or something else having window.
here is an example code
ProError MdlClose(ProMdl pMdl,bool bErase=true)
{
ProError eError;
int nWindowId=0;
if(MdlVisibleGet(pMdl,nWindowId))
{
eError=ProWindowCurrentSet(nWindowId);
eError=ProWindowCurrentClose();
}
if(bErase)
{
eError=ProMdlEraseAll(pMdl);
return eError;
}
return PRO_TK_NO_ERROR;
}
and now the problem. Standard situation: I need to close the document. .. OK let's call this function..eError always equals PRO_TK_NO_ERROR but there one moment.proe in spite of MdlClose function call DOES NOT CLOSE THE WINDOW immediately. I must to do something with it... to click on it or try to activate. It is not pretty to do this programmatically through WIN32 API: I must find the window, then try to simulate its activation and stop these operations when needed. It's uneasy to make this code work good or may be impossible.
and now the main problem. I have no objection to hanging windows after close commands given to protoolkit. the main problem is that proe does not allow you toload the document with the same name in session and also to create the window for it until the closed and "dead" window disappear. And I've broken out my head to resolve the problem.
Have you got some considerations&
I have a problem. I want somebody who knows toolkit well to advise me something to do.
in toolkit there are several functions to close the document and its window ProWindowCurrentSet() ProWindowCurrentClose() ProMdlEraseAll().
toolkit offers you to use them to close part assembly drawing or something else having window.
here is an example code
ProError MdlClose(ProMdl pMdl,bool bErase=true)
{
ProError eError;
int nWindowId=0;
if(MdlVisibleGet(pMdl,nWindowId))
{
eError=ProWindowCurrentSet(nWindowId);
eError=ProWindowCurrentClose();
}
if(bErase)
{
eError=ProMdlEraseAll(pMdl);
return eError;
}
return PRO_TK_NO_ERROR;
}
and now the problem. Standard situation: I need to close the document. .. OK let's call this function..eError always equals PRO_TK_NO_ERROR but there one moment.proe in spite of MdlClose function call DOES NOT CLOSE THE WINDOW immediately. I must to do something with it... to click on it or try to activate. It is not pretty to do this programmatically through WIN32 API: I must find the window, then try to simulate its activation and stop these operations when needed. It's uneasy to make this code work good or may be impossible.
and now the main problem. I have no objection to hanging windows after close commands given to protoolkit. the main problem is that proe does not allow you toload the document with the same name in session and also to create the window for it until the closed and "dead" window disappear. And I've broken out my head to resolve the problem.
Have you got some considerations&