POLYLINE.ODL
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:4k
源码类别:

Windows编程

开发平台:

Visual C++

  1. /*
  2.  * POLYLINE.ODL
  3.  * Neutral Language Polyline Type Library Chapter 24
  4.  *
  5.  * "Neutral" language is considered to be English.  We register
  6.  * this under LCID of 0 so the lcid before "library" has to match.
  7.  *
  8.  * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  9.  *
  10.  * Kraig Brockschmidt, Microsoft
  11.  * Internet  :  kraigb@microsoft.com
  12.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  13.  */
  14. //LIBID_Polyline
  15. [
  16. uuid(00021173-0000-0000-C000-000000000046)
  17.     , helpstring("Polyline Type Library")
  18.     , lcid(0x0000)
  19.     , version(1.0)
  20. ]
  21. library PolylineTypeLibrary
  22.     {
  23.    #ifdef WIN32
  24.     importlib("stdole32.tlb");
  25.     #ifdef UNICODE
  26.      importlib("oc30u.dll");
  27.     #else
  28.      importlib("oc30.dll");
  29.     #endif
  30.    #else
  31.     importlib("stdole.tlb");
  32.     importlib("oc25.dll");
  33.    #endif
  34.     /*
  35.      * IID_IPolylineControl
  36.      * This is an interface like IPolyline10 but attuned to
  37.      * the needs of Automation and oriented directly towards
  38.      * properties and methods that come up in being an OLE Control.
  39.      * The only relevant properties are line style and color;
  40.      * the only relevant methods being Clear and RemoveLastPoint.
  41.      */
  42.     [
  43.     uuid(00021171-0000-0000-C000-000000000046)
  44.         , helpstring("Definition of interface IPolyline10")
  45.         , odl
  46.     ]
  47.     interface IPolylineControl : IUnknown
  48.         {
  49.         //Properties
  50.         [propput, id(-501), helpstring("Background Color")]
  51.             void BackColor([in] OLE_COLOR cr);
  52.         [propget, id(-501)]
  53.             OLE_COLOR BackColor(void);
  54.         [propput, id(-513), helpstring("Line Color")]
  55.             void LineColor([in] OLE_COLOR cr);
  56.         [propget, id(-513)]
  57.             OLE_COLOR LineColor(void);
  58.         [propput, helpstring("Line style")]
  59.             void LineStyle([in] short iStyle);
  60.         [propget]
  61.             short LineStyle(void);
  62.         //Methods
  63.         [helpstring("Clear the entire figure")]
  64.             HRESULT Clear(void);
  65.         [helpstring("Remove the last added point")]
  66.             HRESULT RemoveLastPoint(void);
  67.         }
  68.     //DIID_DIPolylineControl
  69.     [
  70.     uuid(00021172-0000-0000-C000-000000000046)
  71.         , helpstring("Definition of dispinterface DIPolylineControl")
  72.     ]
  73.     dispinterface DIPolylineControl
  74.         {
  75.         interface IPolylineControl;
  76.         }
  77.     //IID_IPolylineAdviseSink10
  78.     [
  79.     uuid(00021159-0000-0000-C000-000000000046)
  80.         , helpstring("Definition of interface IPolylineAdviseSink10")
  81.         , odl
  82.     ]
  83.     interface IPolylineAdviseSink10 : IUnknown
  84.         {
  85.         [id(0), helpstring("A point was added or removed")]
  86.             void OnPointChange(void);
  87.         [id(1), helpstring("The size of the figure changed")]
  88.             void OnSizeChange(void);
  89.         [id(2), helpstring("A color in the figure changed")]
  90.             void OnColorChange(void);
  91.         [id(3), helpstring("The line style of the figure changed")]
  92.             void OnLineStyleChange(void);
  93.         }
  94.     /*
  95.      * DIID_DIPolylineAdviseSink10
  96.      * We declared these separate from IPolylineAdviseSink10
  97.      * so the IUnknown members don't show up in a
  98.      * container's events list.
  99.      */
  100.     [
  101.     uuid(00021170-0000-0000-C000-000000000046)
  102.         , helpstring("Definition of dispinterface DIPolylineAdviseSink10")
  103.     ]
  104.     dispinterface DIPolylineAdviseSink10
  105.         {
  106.         properties:
  107.             //None
  108.         methods:
  109.         [id(0), helpstring("A point was added or removed")]
  110.             void OnPointChange(void);
  111.         [id(1), helpstring("The size of the figure changed")]
  112.             void OnSizeChange(void);
  113.         [id(2), helpstring("A color in the figure changed")]
  114.             void OnColorChange(void);
  115.         [id(3), helpstring("The line style of the figure changed")]
  116.             void OnLineStyleChange(void);
  117.         }
  118.     /*
  119.      * CLSID_Polyline19--sure we're in Chapter 24, but we want to
  120.      * use this same CLSID to be compatible with other OLE
  121.      * Document versions.
  122.      */
  123.     [
  124.     uuid(0002116D-0000-0000-C000-000000000046)
  125.         , helpstring("Polyline Component Type Information")
  126.         , control
  127.     ]
  128.     coclass Polyline19
  129.         {
  130.         dispinterface DIPolylineControl;
  131.         interface     IPolylineControl;
  132.         [default, source] dispinterface DIPolylineAdviseSink10;
  133.         [source]          interface     IPolylineAdviseSink10;
  134.         }
  135.     };