Click here to Skip to main content
15,891,951 members
Articles / Desktop Programming / MFC

Property list ActiveX control

Rate me:
Please Sign up or sign in to vote.
3.88/5 (23 votes)
4 Nov 20043 min read 190.4K   7K   58  
Property list similar to VB.NET, implemented as ActiveX control.
// 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 "proplist.h"

/////////////////////////////////////////////////////////////////////////////
// CPropList

IMPLEMENT_DYNCREATE(CPropList, CWnd)

/////////////////////////////////////////////////////////////////////////////
// CPropList properties

short CPropList::GetPrecision()
{
	short result;
	GetProperty(0x2, VT_I2, (void*)&result);
	return result;
}

void CPropList::SetPrecision(short propVal)
{
	SetProperty(0x2, VT_I2, propVal);
}

long CPropList::GetBorderStyle()
{
	long result;
	GetProperty(0x3, VT_I4, (void*)&result);
	return result;
}

void CPropList::SetBorderStyle(long propVal)
{
	SetProperty(0x3, VT_I4, propVal);
}

BOOL CPropList::GetShowDescription()
{
	BOOL result;
	GetProperty(0x1, VT_BOOL, (void*)&result);
	return result;
}

void CPropList::SetShowDescription(BOOL propVal)
{
	SetProperty(0x1, VT_BOOL, propVal);
}

/////////////////////////////////////////////////////////////////////////////
// CPropList operations

void CPropList::Clear()
{
	InvokeHelper(0x4, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CPropList::AddProperty(LPCTSTR Category, LPCTSTR Caption, const VARIANT& Value, LPCTSTR Description, long ButtonType, BOOL IsEnabled)
{
	static BYTE parms[] =
		VTS_BSTR VTS_BSTR VTS_VARIANT VTS_BSTR VTS_I4 VTS_BOOL;
	InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 Category, Caption, &Value, Description, ButtonType, IsEnabled);
}

void CPropList::SetValue(LPCTSTR PropertyName, const VARIANT& Value)
{
	static BYTE parms[] =
		VTS_BSTR VTS_VARIANT;
	InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 PropertyName, &Value);
}

void CPropList::CloseAll()
{
	InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CPropList::AboutBox()
{
	InvokeHelper(0xfffffdd8, 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