dice.odl

来自「程序实训电子书籍」· ODL 代码 · 共 75 行

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

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

[ uuid(F19149D3-9C7E-48EF-A329-7656865E67C6), version(1.0),
  helpfile("dice.hlp"),
  helpstring("dice ActiveX Control module"),
  control ]
library DICELib
{
	importlib(STDOLE_TLB);
	importlib(STDTYPE_TLB);

	//  Primary dispatch interface for CDiceCtrl

	[ uuid(5823D2F6-2688-49F9-81BF-F2C5824EE392),
	  helpstring("Dispatch interface for Dice Control"), hidden ]
	dispinterface _DDice
	{
		properties:
			// NOTE - ClassWizard will maintain property information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_PROP(CDiceCtrl)
			[id(1)] long RollingInterval;
			[id(2)] OLE_COLOR BallColor;
			[id(3)] OLE_COLOR PanelColor;
			//}}AFX_ODL_PROP

		methods:
			// NOTE - ClassWizard will maintain method information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_METHOD(CDiceCtrl)
			[id(4)] void StartRolling(short max);
			//}}AFX_ODL_METHOD

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

	//  Event dispatch interface for CDiceCtrl

	[ uuid(43589C22-DCA3-4028-979C-6FE5D660E212),
	  helpstring("Event interface for Dice Control") ]
	dispinterface _DDiceEvents
	{
		properties:
			//  Event interface has no properties

		methods:
			// NOTE - ClassWizard will maintain event information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_EVENT(CDiceCtrl)
			[id(1)] void FinishRolling(short state);
			//}}AFX_ODL_EVENT
	};

	//  Class information for CDiceCtrl

	[ uuid(B2E07673-F099-47C1-90CB-717269017EA1),
	  helpstring("Dice Control"), control ]
	coclass Dice
	{
		[default] dispinterface _DDice;
		[default, source] dispinterface _DDiceEvents;
	};


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

⌨️ 快捷键说明

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