You are on page 1of 1

CHAPTER 1: Layout Page items 32

Related APIs

 IMasterOverrideList

 IMasterPage

 IMasterSpread

 kMasterPagesBoss

 kPageBoss

Getting notified of master spread and master page operations


Solution

Implement a document observer interested in IID_ISPREADLIST.

NOTE: This approach works for commands that create, delete, arrange, and copy spreads and pages but
not for all spread and page manipulations. For details of the subject you need to observe, see the API
documentation for the command used to perform the operation in which you are interested.

Related APIs

 IDocument

 IObserver

 ISubject

Page items
Creating a page item
Creating an empty graphic frame

Solution

1. Determine the UIDRef of the parent. The parent is the object that will own the frame. Normally, it is a
spread layer (see “Acquiring a reference to a spread layer”).

2. Determine the bounding box for the frame to position and size it as desired. Normally, frames are
positioned relative to a page (see “Acquiring a reference to a page”).

3. Create the frame by calling the IPathUtils method that creates the path you want:

 Use IPathUtils::CreateRectangleSpline to create a rectangular path.

 Use IPathUtils::CreateOvalSpline to create an elliptical path.

 Use IPathUtils::CreateRegPolySpline to create a regular polygon path.

You might also like