Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.6 KiB

  1. Simpsvr
  2. --------
  3. This sample is the simplest OLE 2.0 object that can be written and
  4. still support the visual editing feature. The object that this server
  5. supports is a colored square with a black border.
  6. See the MAKEFILE for compilation instructions.
  7. Simple Server Objects Overview
  8. ------------------------------
  9. Simple server consists of three main objects. The top level is CSimpSvrApp,
  10. under which is CSimpSvrDoc, and the innermost level is CSimpSvrObj.CSimpSvrApp
  11. is used to hold all the main window information. (eg. handle to the main
  12. window, handles to the main, color, and help menus and the application
  13. instance) Therefore, CSimpSvrApp always exists as long as the simple server
  14. application is alive. The CSimpSvrApp instantiates the Class Factory, if
  15. simple server is started as embedding. (ie. started by OLE) The next level
  16. object is CSimpSvrDoc object. It is instantiated by the time CSimpSvrApp is
  17. created. It manipulates the document window and also the hatch window.
  18. (See OLE2UI for detail on the hatch window) The CSimpSvrObj, the innermost
  19. simple server object, shows six OLE interfaces implementations in its nested
  20. classes. The six OLE interfaces demonstrated are IOleObject, IPersistStorage,
  21. IDataObject,IOleInPlaceActiveObject,IOleInPlaceObject,and IExternalConnection.
  22. These six interfaces are implemented as different classes namely: COleObject,
  23. CPersistStorage, CDataObject, COleInPlaceActiveObject, COleInPlaceObject,
  24. and CExternalConnection. The CSimpSvrObj handles the drawing of the object
  25. and all the OLE connections between the container and the server.
  26.