Quantcast
Channel: Adobe Community : Popular Discussions - InDesign SDK
Viewing all articles
Browse latest Browse all 78596

How to show/hide an indesign document in cs4

$
0
0

Hi all,

 

How to hide/show an indesign document in cs4.

 

In cs3 , I am doing this using the following code --

 

 

IWindow* docWindow = Utils<IWindowUtils>()->GetFrontDocWindow( docRef.GetDataBase() );

 

 

//Schedule the command to show the layout window of original document in CS3

 

InterfacePtr<ICommand> showHideCmd (CmdUtils::CreateCommand( kShowHideWinCmdBoss ));

 

InterfacePtr<ICloseWinCmdData > closeWinCmdData (showHideCmd, IID_ICLOSEWINCMDDATA);

closeWinCmdData->Set( docWindow );

 

InterfacePtr<IIntData> iIntData (showHideCmd, IID_IINTDATA);

iIntData->Set( IWindow::kShow );

 

CmdUtils::ScheduleCommand( showHideCmd );

 

docWindow->BringToFront();

 

In cs4, there is an API kShowHidePresentaitonCmd

 

Code that i wrote for CS4 --

 

//Schedule the command to show the layout window of original document in CS4

IDocumentPresentation* docWindow = Utils<IDocumentUIUtils>()->GetFrontmostPresentationForDocument( docRef.GetDataBase() );

 

InterfacePtr<ICommand> showHideCmd (CmdUtils::CreateCommand( kShowHidePresentationCmdBoss ));

 

 

InterfacePtr<IPresentationCmdData> presentationCmdData (showHideCmd, IID_IPRESENTATIONCMDDATA);

 

presentationCmdData->Set( docWindow );

 

InterfacePtr<IIntData> iIntData (showHideCmd, IID_IINTDATA);

 

iIntData->Set( 0 );                                       // What is the parameter that should be passed in the set function. 0 is not working

 

ErrorCode result = CmdUtils::ProcessCommand( showHideCmd );

 

 

Hide/show document in cs4 is not working

 


Viewing all articles
Browse latest Browse all 78596

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>