singleocx.odl

来自「深入浅出Visual C++入门进阶与应用实例 随书光盘 作者 何志丹」· ODL 代码 · 共 74 行

ODL
74
字号
// SingleOcx.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 (SingleOcx.tlb) that will become a resource in
// SingleOcx.ocx.

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

[ uuid(4DE9B1EE-D6DB-46BF-AA1B-B535FFBE9B20), version(1.0),
  helpfile("SingleOcx.hlp"),
  helpstring("SingleOcx ActiveX Control module"),
  control ]
library SINGLEOCXLib
{
	importlib(STDOLE_TLB);
	importlib(STDTYPE_TLB);

	//  Primary dispatch interface for CSingleOcxCtrl

	[ uuid(FE75388F-55F7-4187-A477-BCA312B5C4FD),
	  helpstring("Dispatch interface for SingleOcx Control"), hidden ]
	dispinterface _DSingleOcx
	{
		properties:
			// NOTE - ClassWizard will maintain property information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_PROP(CSingleOcxCtrl)
			[id(1)] short xPos;
			[id(2)] short yPos;
			//}}AFX_ODL_PROP

		methods:
			// NOTE - ClassWizard will maintain method information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_METHOD(CSingleOcxCtrl)
			[id(3)] void SetText(BSTR lpText);
			//}}AFX_ODL_METHOD

			[id(DISPID_ABOUTBOX)] void AboutBox();
	};

	//  Event dispatch interface for CSingleOcxCtrl

	[ uuid(BE228166-8589-48C1-AEFF-410C9A8F83A3),
	  helpstring("Event interface for SingleOcx Control") ]
	dispinterface _DSingleOcxEvents
	{
		properties:
			//  Event interface has no properties

		methods:
			// NOTE - ClassWizard will maintain event information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_EVENT(CSingleOcxCtrl)
			[id(1)] void SINGLEOLEERR(BSTR strErrMess);
			//}}AFX_ODL_EVENT
	};

	//  Class information for CSingleOcxCtrl

	[ uuid(9336BE03-E76A-4950-84AB-989E854E7CDD),
	  helpstring("SingleOcx Control"), control ]
	coclass SingleOcx
	{
		[default] dispinterface _DSingleOcx;
		[default, source] dispinterface _DSingleOcxEvents;
	};


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

⌨️ 快捷键说明

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