home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / atl / circ / circ.idl < prev    next >
Text File  |  1998-03-26  |  2KB  |  85 lines

  1. // circ.idl : IDL source for circ.dll
  2. //
  3.  
  4. // This file will be processed by the MIDL tool to
  5. // produce the type library (circ.tlb) and marshalling code.
  6.  
  7. //#include <olectl.h>
  8. #define DISPID_CAPTION                  (-518)
  9. #define DISPID_ENABLED                  (-514)
  10. #define DISPID_FORECOLOR                (-513)
  11. #define DISPID_BACKCOLOR                (-501)
  12. #define DISPID_FONT                     (-512)
  13. import "oaidl.idl";
  14. import "ocidl.idl";
  15.  
  16. typedef [uuid(66504301-BE0F-101A-8BBB-00AA00300CAB), public] DWORD OLE_COLOR;
  17.  
  18.  
  19. [
  20.     uuid(C978F52B-E584-11CF-AF44-00A0C9034837),
  21.     version(1.0),
  22.     helpstring("circ 1.0 Type Library")
  23. ]
  24. library CIRCLib
  25. {
  26.     importlib("stdole2.tlb");
  27.     importlib("stdole32.tlb");
  28.     [
  29.         object,
  30.         uuid(263E4BD7-9C7A-11CF-AEDC-00A0C9034837),
  31.         dual,
  32.         helpstring("ICircCtl Interface"),
  33.         pointer_default(unique)
  34.     ]
  35.     interface ICircCtl : IDispatch
  36.     {
  37.  
  38.         [propput, id(DISPID_CAPTION)]
  39.         HRESULT Caption([in]BSTR pCaption);
  40.         [propget, id(DISPID_CAPTION)]
  41.         HRESULT Caption([out,retval]BSTR* ppCaption);
  42.         [propput, id(DISPID_ENABLED)]
  43.         HRESULT Enabled([in]VARIANT_BOOL vbool);
  44.         [propget, id(DISPID_ENABLED)]
  45.         HRESULT Enabled([out,retval]VARIANT_BOOL* pbool);
  46.         [propput, id(DISPID_BACKCOLOR)]
  47.         HRESULT BackColor([in]OLE_COLOR clr);
  48.         [propget, id(DISPID_BACKCOLOR)]
  49.         HRESULT BackColor([out,retval]OLE_COLOR* pclr);
  50.         [propput, id(DISPID_FORECOLOR)]
  51.         HRESULT ForeColor([in]OLE_COLOR clr);
  52.         [propget, id(DISPID_FORECOLOR)]
  53.         HRESULT ForeColor([out,retval]OLE_COLOR* pclr);
  54.         [propput, id(DISPID_FONT)]
  55.         HRESULT Font([in]IFontDisp* pFont);
  56.         [propputref, id(DISPID_FONT)]
  57.         HRESULT Font([in]IFontDisp* pFont);
  58.         [propget, id(DISPID_FONT)]
  59.         HRESULT Font([out,retval]IFontDisp** ppFont);
  60.     };
  61.  
  62.     [
  63.         uuid(19A4FF37-9C7E-11CD-AEDC-00A0C9034837),
  64.         helpstring("Event interface for Circ Control")
  65.     ]
  66.     dispinterface _CircEvents
  67.     {
  68.         properties:
  69.         methods:
  70.         [id(1)] void Click();
  71.         [id(2)] void KeyPress(short KeyAscii);
  72.     };
  73.  
  74.  
  75.     [
  76.         uuid(C978F531-E584-11CF-AF44-00A0C9034837),
  77.         helpstring("CircCtl Atl Control")
  78.     ]
  79.     coclass CCircCtl
  80.     {
  81.         [default] interface ICircCtl;
  82.         [default, source] dispinterface _CircEvents;
  83.     };
  84. };
  85.