Hi All,
I am trying to prevent document close event by using command interceptor mechanism but could not get succeed and document gets closed from layout window,
Is there exist a way so that document remains opened in layout window.?
I did followings
ICommandInterceptor::InterceptResult EDCmdInterceptor::InterceptProcessCommand(ICommand *cmd)
{
InterceptResult result = kCmdNotHandled;
do
{
ClassID classID = GetClass(cmd);
if(classID == kCloseDocCmdBoss)
{
result = kCmdHandled;
}
} while (false);
return result;
}
ICommandInterceptor::InterceptResult EDCmdInterceptor::InterceptScheduleCommand(ICommand *cmd)
{
InterceptResult result = kCmdNotHandled;
do
{
ClassID classID = GetClass(cmd);
ICommand::CommandState state;
if(classID == kCloseDocCmdBoss)
{
result = kCmdHandled;
}
} while (false);
return result;
}
ICommandInterceptor::InterceptResult EDCmdInterceptor::InterceptExecuteImmediate(ICommand *cmd)
{
InterceptResult result = kCmdNotHandled;
do
{
ClassID classID = GetClass(cmd);
if(classID == kCloseDocCmdBoss)
{
result = kCmdHandled;
}
} while (false);
return result;
}
ICommandInterceptor::InterceptResult EDCmdInterceptor::InterceptExecuteDynamic(ICommand *cmd)
{
InterceptResult result = kCmdNotHandled;
do
{
ClassID classID = GetClass(cmd);
if(classID == kCloseDocCmdBoss)
{
result = kCmdHandled;
}
} while (false);
return result;
}
North America
Europe, Middle East and Africa
Asia Pacific