home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winui / shell / fileview / flattext.txt < prev    next >
Encoding:
Text File  |  1995-05-18  |  2.7 KB  |  48 lines

  1. Overview of Windows 95 File Viewing
  2. -----------------------------------
  3.  
  4. The Explorer is the centralized shell tool in which the end user will
  5. browse through information on the file system and the network under
  6. Windows 95.  One of the features of the Explorer is the ability to
  7. quickly view the contents of a file without having to run the full
  8. application that created it and without even requiring the presence of
  9. that application.  In order to view file contents, the end user selects
  10. one or more files in the Explorer and chooses the "Quick View" menu
  11. item from the context menu of that selection or from the
  12. Explorer's File menu.
  13.  
  14. In response, the Explorer will invoke file-specific viewers for each
  15. selected file, using the class identifier (an OLE 2 CLSID) of the file to
  16. determine which viewer to invoke if the file is an OLE 2 compound file.
  17. Otherwise Explorer uses the extension of the file to determine which
  18. viewer to use.  A file viewer associates itself with file classes and
  19. extensions in the system registry.
  20.  
  21. A file viewer, referred to in this document as a FileViewer, is an OLE 2
  22. component object (not a compound document object) implemented inside an
  23. in-process server DLL which itself is associated with the FileViewer's
  24. CLSID.  These components are responsible for providing all the top-level
  25. user interface for viewing a file including menu items, toolbar, and
  26. status bar as described in the FileViewer User Interface Guidelines.
  27.  
  28. The FileViewer objects themselves, which are separate from the class
  29. factory objects in their respective in-process servers, implement the
  30. standard OLE 2 interface IPersistFile as well as a new interface called
  31. IFileViewer.  The Explorer itself does not interact directly with
  32. FileViewer objects--instead, the Explorer launches an instance of a
  33. small program called QVStub (Quick View Stub, a Windows EXE but not a
  34. full application) for each file to view that serves to define a process,
  35. with its own message queue, for each FileViewer.  QVStub is responsible
  36. for associating a pathname with a FileViewer, instantiating that
  37. FileViewer object, and instructing it to load the file and display it
  38. for viewing.
  39.  
  40. Because a FileViewer is an OLE 2 component object, additional interfaces
  41. and functionality can be added later in future versions of Windows to
  42. support new and interesting features.  For example, the FileViewer can
  43. act as an OLE 2 container application and in-place activate embedded
  44. objects inside the displayed file.  It could allow the end user to
  45. make a selection in the document and copy it to the clipboard or source
  46. it in a drag & drop operation.  But such functionality is entirely up to
  47. the implementor of the FileViewer component.
  48.