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

How to print an ActiveX MSChart control

Rate me:
Please Sign up or sign in to vote.
4.30/5 (9 votes)
4 Aug 20023 min read 198.4K   5.3K   44  
A demonstration of printing or print previewing a MsChart component
// 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 "vcfont.h"

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


/////////////////////////////////////////////////////////////////////////////
// CVcFont properties

/////////////////////////////////////////////////////////////////////////////
// CVcFont operations

CString CVcFont::GetName()
{
	CString result;
	InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
	return result;
}

void CVcFont::SetName(LPCTSTR lpszNewValue)
{
	static BYTE parms[] =
		VTS_BSTR;
	InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 lpszNewValue);
}

float CVcFont::GetSize()
{
	float result;
	InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_R4, (void*)&result, NULL);
	return result;
}

void CVcFont::SetSize(float newValue)
{
	static BYTE parms[] =
		VTS_R4;
	InvokeHelper(0x2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 newValue);
}

short CVcFont::GetStyle()
{
	short result;
	InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
	return result;
}

void CVcFont::SetStyle(short nNewValue)
{
	static BYTE parms[] =
		VTS_I2;
	InvokeHelper(0x3, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 nNewValue);
}

short CVcFont::GetEffect()
{
	short result;
	InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
	return result;
}

void CVcFont::SetEffect(short nNewValue)
{
	static BYTE parms[] =
		VTS_I2;
	InvokeHelper(0x4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
		 nNewValue);
}

CVcColor CVcFont::GetVtColor()
{
	LPDISPATCH pDispatch;
	InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL);
	return CVcColor(pDispatch);
}

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 Shohero Technologies Ltd
Taiwan Taiwan
Victor Porter is a software engineer who is in Taiwan learning martial arts in his virtually little free time. He also enjoys playing golf occasionally at 5:30 in the morning by sacrificing his dearly needed sleep. He is constantly racking his brains trying to decided if his next project should use his near-decade-experienced-C++ or his near-half-year-C# skills. An American from Pennsylvania, he is currently living in Taipei, Taiwan with his wife and lovely 6 months old daughter, Christine.

Comments and Discussions