Click here to Skip to main content
15,897,704 members
Articles / Desktop Programming / MFC

Embeddable script editor for MFC applications

Rate me:
Please Sign up or sign in to vote.
4.90/5 (60 votes)
15 Jul 20032 min read 337.7K   6.4K   130  
A library that allows you to embed scripting functionality to your C++ MFC application.
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++

// NOTE: Do not modify the contents of this file.  If this class is regenerated by
//  Microsoft Visual C++, your modifications will be overwritten.


#include "stdafx.h"
#include "tabs.h"

// Dispatch interfaces referenced by this interface
#include "tab.h"


/////////////////////////////////////////////////////////////////////////////
// CTabs properties

/////////////////////////////////////////////////////////////////////////////
// CTabs operations

long CTabs::GetCount()
{
	long result;
	InvokeHelper(0x3c, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
	return result;
}

LPUNKNOWN CTabs::Get_NewEnum()
{
	LPUNKNOWN result;
	InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
	return result;
}

CTab CTabs::_GetItemByIndex(long lIndex)
{
	LPDISPATCH pDispatch;
	static BYTE parms[] =
		VTS_I4;
	InvokeHelper(0x60020002, DISPATCH_METHOD, VT_DISPATCH, (void*)&pDispatch, parms,
		lIndex);
	return CTab(pDispatch);
}

CTab CTabs::_GetItemByName(LPCTSTR bstr)
{
	LPDISPATCH pDispatch;
	static BYTE parms[] =
		VTS_BSTR;
	InvokeHelper(0x60020003, DISPATCH_METHOD, VT_DISPATCH, (void*)&pDispatch, parms,
		bstr);
	return CTab(pDispatch);
}

LPDISPATCH CTabs::Item(const VARIANT& varg)
{
	LPDISPATCH result;
	static BYTE parms[] =
		VTS_VARIANT;
	InvokeHelper(0x0, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
		&varg);
	return result;
}

LPUNKNOWN CTabs::Enum()
{
	LPUNKNOWN result;
	InvokeHelper(0x60020005, DISPATCH_METHOD, VT_UNKNOWN, (void*)&result, NULL);
	return result;
}

CTab CTabs::Add(const VARIANT& bstrName, const VARIANT& bstrCaption, const VARIANT& lIndex)
{
	LPDISPATCH pDispatch;
	static BYTE parms[] =
		VTS_VARIANT VTS_VARIANT VTS_VARIANT;
	InvokeHelper(0x42, DISPATCH_METHOD, VT_DISPATCH, (void*)&pDispatch, parms,
		&bstrName, &bstrCaption, &lIndex);
	return CTab(pDispatch);
}

CTab CTabs::_Add(LPCTSTR bstrName, LPCTSTR bstrCaption)
{
	LPDISPATCH pDispatch;
	static BYTE parms[] =
		VTS_BSTR VTS_BSTR;
	InvokeHelper(0x60020007, DISPATCH_METHOD, VT_DISPATCH, (void*)&pDispatch, parms,
		bstrName, bstrCaption);
	return CTab(pDispatch);
}

CTab CTabs::_Insert(LPCTSTR bstrName, LPCTSTR bstrCaption, long lIndex)
{
	LPDISPATCH pDispatch;
	static BYTE parms[] =
		VTS_BSTR VTS_BSTR VTS_I4;
	InvokeHelper(0x60020008, DISPATCH_METHOD, VT_DISPATCH, (void*)&pDispatch, parms,
		bstrName, bstrCaption, lIndex);
	return CTab(pDispatch);
}

void CTabs::Remove(const VARIANT& varg)
{
	static BYTE parms[] =
		VTS_VARIANT;
	InvokeHelper(0x43, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 &varg);
}

void CTabs::Clear()
{
	InvokeHelper(0x3e, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

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
Software Developer (Senior) RDV Systems
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions