home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / oleaut / spoly / readme.txt < prev    next >
Encoding:
Text File  |  1996-01-17  |  1.5 KB  |  44 lines

  1. OLE Automation Sample
  2.  
  3.  
  4. SUMMARY
  5. =======
  6.  
  7. The SPoly sample draws polygons. The only way to make SPoly draw a polygon 
  8. is to use its programmability interface.
  9.  
  10. One OLE automation object is exposed by Spoly: spoly.application.
  11. The object spoly.application is associated with SPoly's main application 
  12. window. It controls drawing polygons and clearing the display.
  13.  
  14. MORE INFORMATION
  15. ================
  16.  
  17. SPoly implements IDispatch for spoly.application.
  18.  
  19. Methods defined on spoly.application
  20. -----------------------------------
  21.  
  22. Name                        Description
  23.  
  24. Draw                        Draw the polygon.
  25. Reset                       Delete all points from the polygon.
  26. AddPoint(X, Y)              Add a point with coordinates (x,y) to the 
  27.                             polygon.
  28. EnumPoints as VT_ENUM       Return a collection of the polygon's points.
  29. GetXOrigin as short         Get the X origin of the polygon.
  30. SetXOrigin(x as short)      Set the X origin of the polygon.
  31. GetYOrigin as short         Get the Y origin of the polygon.
  32. SetYOrigin(y as short)      Set the Y origin of the polygon.
  33. GetWidth as short           Get the line width of the polygon.
  34. SetWidth(width as short)    Set the line width of the polygon.
  35.  
  36. Shortcomings of this sample
  37. ---------------------------
  38.  
  39. Many items in this sample should be properties. Instead, they are 
  40. implemented as methods. Anything that behaves like an attribute of the 
  41. object should be a property.
  42.  
  43. This is not a good example of how to implement a collection.
  44.