Click here to Skip to main content
15,882,017 members
Articles / Desktop Programming / ATL

Create a Universal Document Template which supports Dynamic Frame Window Layout

Rate me:
Please Sign up or sign in to vote.
3.00/5 (8 votes)
14 Dec 20024 min read 49.2K   668   24  
Introduce a programming technology to design a very complex, rich document type.
// MfcViewLib.idl : IDL source for MfcViewLib
//

// This file will be processed by the MIDL tool to
// produce the type library (MfcViewLib.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";

[
	object,
	uuid(EA4A44D2-1E1C-4DB8-844F-CA68562854BD),
	dual,
	nonextensible,
	helpstring("ICnn Interface"),
	pointer_default(unique)
]
interface ICnn : IDispatch{
		[id(1), helpstring("method Connect"), hidden] HRESULT Connect([in]long pConnectManager);
};
[
	object,
	uuid(C409237C-9024-4031-8A4F-12B7DDAA84F1),
	dual,
	nonextensible,
	helpstring("IAtlView2 �ӿ�"),
	pointer_default(unique)
]
interface IAtlView2 : IDispatch{
		[propget, id(1), helpstring("property Name")] HRESULT Name([out, retval] BSTR *pVal);
		[propput, id(1), helpstring("property Name")] HRESULT Name([in] BSTR newVal);
		[id(2), helpstring("method TestEvent2")] HRESULT TestEvent2(void);
};
[
	object,
	uuid(307492C2-F51E-4E5F-BBF6-54712EA0C985),
	dual,
	nonextensible,
	helpstring("IAtlView3 �ӿ�"),
	pointer_default(unique)
]
interface IAtlView3 : IDispatch{
		[propget, id(1), helpstring("property Name")] HRESULT Name([out, retval] BSTR *pVal);
		[propput, id(1), helpstring("property Name")] HRESULT Name([in] BSTR newVal);
		[id(2), helpstring("method GetText")] HRESULT GetText(BSTR str);
};
[
	uuid(4EDD4D94-D451-4835-8C00-102FD78350D5),
	version(1.0),
	helpstring("MfcViewLib 1.0 Type Library")
]
library MfcViewLibLib
{
	importlib("stdole2.tlb");
	[
		uuid(007AC956-C05B-4AC8-B516-3FF1DE5740FE),
		helpstring("Cnn Class")
	]
	coclass Cnn
	{
		[default] interface ICnn;
	};
	[
		uuid(4273B169-86C2-468E-B776-1B86260060CB),
		helpstring("_IAtlView2Events Interface")
	]
	dispinterface _IAtlView2Events
	{
		properties:
		methods:
		[id(1), helpstring("method testEvent")] HRESULT testEventX(void);
	};
	[
		uuid(6B53C960-D094-487F-B615-2ABD5E0134F2),
		helpstring("AtlView2 Class")
	]
	coclass AtlView2
	{
		[default] interface IAtlView2;
		[default, source] dispinterface _IAtlView2Events;
	};
	[
		uuid(A438C3B6-1410-4B6B-8C51-82CAD10B6F27),
		helpstring("_IAtlView3Events Interface")
	]
	dispinterface _IAtlView3Events
	{
		properties:
		methods:
		[id(1), helpstring("method xxxxxxxxxxxxx")] HRESULT xxxxxxxxxxxxx(void);
	};
	[
		uuid(07B2433B-7686-44F5-B99F-C7823E374E07),
		helpstring("AtlView3 Class")
	]
	coclass AtlView3
	{
		[default] interface IAtlView3;
		[default, source] dispinterface _IAtlView3Events;
	};
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions