rectangle.odl

来自「VC++写的一个Activex控件源码」· ODL 代码 · 共 75 行

ODL
75
字号
// rectangle.odl : type library source for ActiveX Control project.

// This file will be processed by the Make Type Library (mktyplib) tool to
// produce the type library (rectangle.tlb) that will become a resource in
// rectangle.ocx.

#include <olectl.h>
#include <idispids.h>

[ uuid(C79658A8-63CF-491A-8B06-5177D5BF3775), version(1.0),
  helpfile("rectangle.hlp"),
  helpstring("rectangle ActiveX Control module"),
  control ]
library RECTANGLELib
{
	importlib(STDOLE_TLB);
	importlib(STDTYPE_TLB);

	//  Primary dispatch interface for CRectangleCtrl

	[ uuid(E2CE90B2-D6D3-4991-BD6E-8D1EF3AD3F7A),
	  helpstring("Dispatch interface for Rectangle Control"), hidden ]
	dispinterface _DRectangle
	{
		properties:
			// NOTE - ClassWizard will maintain property information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_PROP(CRectangleCtrl)
			[id(1)] OLE_COLOR BackColor;
			[id(2)] OLE_COLOR ForeColor;
			[id(3)] boolean ImageHollow;
			[id(4)] short LineSize;
			[id(5)] OLE_COLOR FillColor;
			[id(DISPID_TEXT), bindable, requestedit] BSTR Text;
			//}}AFX_ODL_PROP

		methods:
			// NOTE - ClassWizard will maintain method information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_METHOD(CRectangleCtrl)
			//}}AFX_ODL_METHOD
	};

	//  Event dispatch interface for CRectangleCtrl

	[ uuid(AA796C81-DFEC-4DA1-B5C0-9881E71B4557),
	  helpstring("Event interface for Rectangle Control") ]
	dispinterface _DRectangleEvents
	{
		properties:
			//  Event interface has no properties

		methods:
			// NOTE - ClassWizard will maintain event information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_EVENT(CRectangleCtrl)
			[id(DISPID_CLICK)] void Click();
			//}}AFX_ODL_EVENT
	};

	//  Class information for CRectangleCtrl

	[ uuid(CA77F7DF-0539-4F0E-9F5B-2EE6A53B9F5D),
	  helpstring("Rectangle Control"), control ]
	coclass Rectangle
	{
		[default] dispinterface _DRectangle;
		[default, source] dispinterface _DRectangleEvents;
	};


	//{{AFX_APPEND_ODL}}
	//}}AFX_APPEND_ODL}}
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?