Mombu the Computer Design Forum

  Mombu the Computer Design Forum > Computer_Design > Resize document


User Name
Password
REGISTER NOW! Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
1 7th April 01:05
toke_jansen_hansen
External User
 
Posts: 1
Default Resize document



Hi there

How can i change the document size in the same way as done in the "File->Document Setup" dialog?

I have not been able to find any sample code, so if somebody could point me in the right direction i would really appreciate it.

Thanks

Best regards Toke
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


2 8th April 08:26
daniel hüsch
External User
 
Posts: 1
Default Resize document



Hi Toke,

here is my code to set the document dimensions:

PMRect newSize;
newSize.SetDimensions(newWidth,newHeight);
InterfacePtr<ICommand> frontDocCmdData(CmdUtils::CreateCommand(kSetPageSi zeCmdBoss));
InterfacePtr<IDocSetupCmdData> docSetupCmdData(frontDocCmdData, IID_IDOCSETUPCMDDATA);
docSetupCmdData->SetDocument(documentUIDRef);
docSetupCmdData->SetPageSize(neueSeitengroesse);
CmdUtils::ProcessCommand(frontDocCmdData);
// refresh the screen
if (desktop)
{
InterfacePtr<IDocument> document(documentUIDRef, UseDefaultIID());
Utils<ILayoutUIUtils>()->InvalidateViews(document);
}

Daniel
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes







Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
Also visit Ogoun the Usenet Archive
666