当前位置:文档下载 > 所有分类 > C++源码阅读(45)
免费下载此文档

C++源码阅读(45)

?C++ Source Part One
#include<stdio.h>
int age(int n)
{
int x;
if(n == 1)
x=10;
else
x=age(n-1)+2;
return x;
}
int main()
{
int n;
printf("请输入n值:");
scanf("%d", &n);
printf("第%d个人的年龄为%d\n", n, age(n));
return 0;
}

#include "stdafx.h"
#include "vcdatapointlabel.h"
Dispatch interfaces referenced by this interface
#include "VcBackdrop.h"
#include "VcFont.h"
#include "VcLCoor.h"
#include "vctextlayout.h"
#include "Font.h"
CVcDataPointLabel properties
CVcDataPointLabel operations
CString CVcDataPointLabel::GetText()
{
CString result;
InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_BSTR, (void)&result, NULL);
return result;
}
void CVcDataPointLabel::SetText(LPCTSTR lpszNewValue)
{
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
lpszNewValue);
}
CVcBackdrop CVcDataPointLabel::GetBackdrop()
{
LPDISPATCH pDispatch;
InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_DISPATCH, (void)&pDispatch, NULL);
return CVcBackdrop(pDispatch);
}
CVcFont CVcDataPointLabel::GetVtFont()
{
LPDISPATCH pDispatch;
InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void)&pDispatch, NULL);
return CVcFont(pDispatch);
}
CVcLCoor CVcDataPointLabel::GetOffset()
{
LPDISPATCH pDispatch;
InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_DISPATCH, (void)&pDispatch, NULL);
return CVcLCoor(pDispatch);
}
CVcTextLayout CVcDataPointLabel::GetTextLayout()
{
LPDISPATCH pDispatch;
InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void)&pDispatch, NULL);
return CVcTextLayout(pDispatch);
}
long CVcDataPointLabel::GetLocationType()
{
long result;
InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_I4, (void)&result, NULL);
return result;
}
void CVcDataPointLabel::SetLocationType(long nNewValue)
{
static BYTE parms[] =
VTS_I4;
InvokeHelper(0x6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
nNewValue);
}
BOOL CVcDataPointLabel::GetCustom()
{
BOOL result;
InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_BOOL, (void)&result, NULL);
return result;
}
void CVcDataPointLabel::SetCustom(BOOL bNewValue)
{
static BYTE parms[] =
VTS_BOOL;
InvokeHelper(0x7, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
bNewValue);
}
short CVcDataPointLabel::GetComponent()
{
short result;
InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_I2, (void)&result, NULL);
return result;
}
void CVcDataPointLabel::SetComponent(short nNewValue)
{
static BYTE parms[] =
VTS_I2;
InvokeHelper(0x8, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
nNewValue);
}
long CVcDataPointLabel::GetLineStyle()
{
long result;
InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_I4, (void)&result, NULL)


;
return result;
}
void CVcDataPointLabel::SetLineStyle(long nNewValue)
{
static BYTE parms[] =
VTS_I4;
InvokeHelper(0x9, DISPATCH_PROPER

第1页

免费下载Word文档免费下载:C++源码阅读(45)

(下载1-8页,共8页)

我要评论

TOP相关主题

返回顶部