ncombo.odl

来自「教你怎么用VC++做ActiveX控件」· ODL 代码 · 共 95 行

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

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

[ uuid(DE201785-9000-11D2-8726-0040055C08D9), version(1.0),
  helpfile("NCombo.hlp"),
  helpstring("NCombo ActiveX Control module"),
  control ]
library NCOMBOLib
{
	importlib(STDOLE_TLB);
	importlib(STDTYPE_TLB);

	//  Primary dispatch interface for CNComboCtrl

	[ uuid(DE201786-9000-11D2-8726-0040055C08D9),
	  helpstring("Dispatch interface for NCombo Control"), hidden ]
	dispinterface _DNCombo
	{
		properties:
			// NOTE - ClassWizard will maintain property information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_PROP(CNComboCtrl)
			[id(1)] long DropDownHeight;
			[id(DISPID_FONT), bindable] IFontDisp* Font;
			[id(2)] long ColumnKey;
			[id(3)] boolean Resizing;
			[id(4)] long SelectItem;
			//}}AFX_ODL_PROP

		methods:
			// NOTE - ClassWizard will maintain method information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_METHOD(CNComboCtrl)
			[id(5)] long InsertColumn(long nColumn, BSTR sColumnName, long nWidth, long nJustify, boolean bEnable, boolean bVisible);
			[id(6)] boolean DeleteColumn(long nColumn);
			[id(7)] long GetColumnCount();
			[id(8)] long InsertItem(long nItem, BSTR sItem);
			[id(9)] boolean SetItemText(long nItem, long nSubItem, BSTR sItem);
			[id(10)] boolean SetItemData(long nItem, long wData);
			[id(11)] long GetItemCount();
			[id(12)] BSTR GetItemText(long nItem, long nSubItem);
			[id(13)] long GetItemData(long nItem);
			[id(14)] BSTR GetColumnName(long nColumn);
			[id(15), propget] long ColumnWidth(long nColumn);
			[id(15), propput] void ColumnWidth(long nColumn, long nNewValue);
			[id(16), propget] boolean ColumnVisible(long nColumn);
			[id(16), propput] void ColumnVisible(long nColumn, boolean bNewValue);
			[id(17), propget] boolean ColumnEnable(long nColumn);
			[id(17), propput] void ColumnEnable(long nColumn, boolean bNewValue);
			//}}AFX_ODL_METHOD

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

	//  Event dispatch interface for CNComboCtrl

	[ uuid(DE201787-9000-11D2-8726-0040055C08D9),
	  helpstring("Event interface for NCombo Control") ]
	dispinterface _DNComboEvents
	{
		properties:
			//  Event interface has no properties

		methods:
			// NOTE - ClassWizard will maintain event information here.
			//    Use extreme caution when editing this section.
			//{{AFX_ODL_EVENT(CNComboCtrl)
			[id(1)] void ChangingItem(long nItem);
			[id(2)] void ChangedItem(long nItem);
			[id(3)] void ChangeColumnKey(long nColumn);
			[id(4)] void ChangeColumnContent(short nColumn, BSTR sColumnContent, long nType);
			//}}AFX_ODL_EVENT
	};

	//  Class information for CNComboCtrl

	[ uuid(DE201788-9000-11D2-8726-0040055C08D9), licensed,
	  helpstring("NCombo Control"), control ]
	coclass NCombo
	{
		[default] dispinterface _DNCombo;
		[default, source] dispinterface _DNComboEvents;
	};


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

⌨️ 快捷键说明

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