IApplicationWindows DataWindows never returns results

Discussion created by phiman67 on Apr 17, 2012
Latest reply on Apr 19, 2012 by agray1
I have implemented a context menu option which, when clicked, tries to find the current ITableWindow which is being shown to the user.

An accepted way of doing this in an addin is to call:
   //to get a reference to the application
   IApplicationWindows pApplicationWindows= (IApplicationWindows)ArcMap.Application;

   //to get the set of data windows
   ISet pDataWindows = pApplicationWindows.DataWindows;

and then you can iterate over the set to check each IDataWindow to see if it has what you want.

Below is a link which takes the same approach of iterating over the data windows, checking each one for a particular characteristic (see method FindGraphWindow):

The problem I'm having is that since I have started using ArcMap 10, the call to pApplicationWindows.DataWindows always returns an empty set. 
I have tested my ArcMap extension which was migrated to ArcMap 10 and the same issue (via IHookHelper) exists for it.  This is working in ArcMap 9.x.

Does anyone know why this might be causing this issue in ArcMap 10 and not in ArcMap 9?

Any help would be much appreciated.