Even if the method AutoAttach exists, it doesn't imply it will call automatically. You should call AutoAttach yourself.
You need also e.g. a responder service (maybe Startup/Shutdown) from where you will call all AutoAttach methods of your observers.
It is better to AddIn your IID_IABCDOCOBSERVER to existing boss-class (kWorkspaceBoss or kDocumentBoss).
Thanks for replying Suraba.
I have already created my custom observer, IID_IABCDOCOBSERVER and added it in my dialog's class. I'm calling its Auto-attach whenever my plugin is opened. I'm already using this for observing GridPreferences, PagePreferences etc. This works fine for them.
Now I have to observe the change in active spread & still looking for the solution.
Suppose there are 3 master spreads on any document, ABC-1, ABC-2, ABC-3.
ABC-1 is the currently active spread. Now, if I select ABC-2 from InDesign, I want to get its notificaiton. Plz help me out.
I need to clarify what kind of event you're interested in.
1. When you click once on page/spead widget in the Pages panel and only widget becomes selected. The layout window remains unchanged. OR
2. When you doubleclick on page/spread widget the selected master spread appears in the layout window.
In the first case you work with Pages panel.
Have a look to file PageTransitionsPanelObserver.cpp from SDK.
In the second case you work with Layout window.
Thanks a lot Suraba
I got the solution in ths sample. I was interested in the 2nd kind of event that u mentioned..