mfc >> Valid VtChChartType

by Kwan » Sat, 29 Nov 2003 08:24:23 GMT

Hi All,

Using OLE view, we can find that there are 27 chart type defined.

However, when we try to use it, a lot of them thrown an error. May I know
where can I get confirmation on what are the valid chart type that are
usable?

Thansk in advance.

enum {
VtChChartType3dBar = 0,
VtChChartType2dBar = 1,
VtChChartType3dLine = 2,
VtChChartType2dLine = 3,
VtChChartType3dArea = 4,
VtChChartType2dArea = 5,
VtChChartType3dStep = 6,
VtChChartType2dStep = 7,
VtChChartType3dCombination = 8,
VtChChartType2dCombination = 9,
VtChChartType3dHorizontalBar = 10,
VtChChartType2dHorizontalBar = 11,
VtChChartType3dClusteredBar = 12,
VtChChartType3dPie = 13,
VtChChartType2dPie = 14,
VtChChartType3dDoughnut = 15,
VtChChartType2dXY = 16,
VtChChartType2dPolar = 17,
VtChChartType2dRadar = 18,
VtChChartType2dBubble = 19,
VtChChartType2dHiLo = 20,
VtChChartType2dGantt = 21,
VtChChartType3dGantt = 22,
VtChChartType3dSurface = 23,
VtChChartType2dContour = 24,
VtChChartType3dScatter = 25,
VtChChartType3dXYZ = 26,
VtChChartTypeCount = 27
} VtChChartType;




mfc >> Valid VtChChartType

by xmontyx » Sat, 29 Nov 2003 18:00:03 GMT


was using excel in mfc app
needed some chart so here is what i dig up
if this is of any use

#define xlZero 2
#define xlY 1
#define xlXYScatter -4169
#define xlX -4168
#define xlWizardDisplayNever 2
#define xlWizardDisplayDefault 0
#define xlWizardDisplayAlways 1
#define xlVertical -4166
#define xlValue 2
#define xlUpward -4171
#define xlUp -4162
#define xlTriangle 3
#define xlTransparent 2
#define xlTop -4160
#define xlThin 2
#define xlThick 4
#define xlStretch 1
#define xlStError 4
#define xlStDev -4155
#define xlStar 5
#define xlStack 2
#define xlSquare 1
#define xlSolid 1
#define xlSingleAccounting 4
#define xlSingle 2
#define xlShowValue 2
#define xlShowPercent 3
#define xlShowLabelAndPercent 5
#define xlShowLabel 4
#define xlSeries 3
#define xlSemiGray 7510
#define xlSecondary 2
#define xlScale 3
#define xlRows 1
#define xlRight -4152
#define xlRadar -4151
#define xlPrimary 1
#define xlPower 4
#define xlPolynomial 3
#define xlPlusValues 2
#define xlPlus 9
#define xlPie 5
#define xlPicture -4147
#define xlPercent 2
#define xlOutside 3
#define xlOpaque 3
#define xlNotPlotted 1
#define xlNormal -4143
#define xlNone -4142
#define xlNoCap 2
#define xlNextToAxis 4
#define xlMovingAvg 6
#define xlMinusValues 3
#define xlMinimum 2
#define xlMinimized -4140
#define xlMedium -4138
#define xlMaximum 2
#define xlMaximized -4137
#define xlLow -4134
#define xlLogarithmic -4133
#define xlLinear -4132
#define xlLine 4
#define xlLightVertical 12
#define xlLightUp 14
#define xlLightHorizontal 11
#define xlLightDown 13
#define xlLeft -4131
#define xlJustify -4130
#define xlInterpolated 3
#define xlInside 2
#define xlHorizontal -4128
#define xlHigh -4127
#define xlHairline 1
#define xlGrid 15
#define xlGray8 18
#define xlGray75 -4126
#define xlGray50 -4125
#define xlGray25 -4124
#define xlGray16 17
#define xlFixedValue 1
#define xlExponential 5
#define xlDownward -4170
#define xlDown -4121
#define xlDoughnut -4120
#define xlDoubleAccounting 5
#define xlDouble -4119
#define xlDot -4118
#define xlDistributed -4117
#define xl


Similar Threads

1. Check if a string can be a valid identifier - CSharp / C#

2. Convert hh:mm:ss AM/PM into valid time

I am using an edit control to accept time including AM/PM. I can get
the hour/min and seconds but how do I convert the AM/PM part into the
internal representation for time using a DateTime object.
Any help appreciated.

3. 'String was not recognized as a valid DateTime. - CSharp / C#

4. Can not create valid c# proxy


5. SQL Tinyint / LINQ / cast not valid - please help - CSharp/C#

6. Check if string has valid DateTime format

Hi,

I have the following event which checks if a cell in a dgv contains a
date and if so, checks if it is formatted correctly. I don't think its
good practice for be to try this by catching an exception. Is there a
better way? Notice also my use of a dummy dateTime object. Also, does
the DateTime object contain any information about how it should be
formatted? For example -

"Format Error: DateTime cell incorrectly formatted. Expected format: "
+ DateTime.ExpectedFormat;

Thanks,

Barry.

private void DataGridView_CellValidating(object sender,
DataGridViewCellValidatingEventArgs e)
        {
            DataGridView dataGridView = ((DataGridView)sender);
            DataGridViewCell dataGridViewCell =
dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex];

            // if formatting a DateTime cell
            if (dataGridViewCell.ValueType == typeof(DateTime))
            {
                try
                {
                    DateTime dateTime = (DateTime)((new
DateTimeConverter()).ConvertFromString((string)e.FormattedValue));
                }
                catch (FormatException formatException)
                {
                    dataGridView.Rows[e.RowIndex].ErrorText = "Format
Error: DateTime cell incorrectly formatted.";
                    e.Cancel = true;
                }
            }
        }

7. The current news channel may not be valid - CSharp/C#

8. Specified cast is not valid error

Can someone help me out if possible with this error when running a 
program.

I have this code in the program
//-------------------------------------------
System.Data.OleDb.OleDbCommand vCommand = mConnection.CreateCommand();

string vSql = "INSERT INTO [Nodes] 
(ParentID,aName,Description,R,G,B,Serial) " +
"VALUES(-1,'" + iName + "','" + iDescription + "'," + iRed.ToString() 
+ "," + iGreen.ToString() +
"," + iBlue.ToString() + ",'" + iSerial + "')";

vCommand.CommandText = vSql;
vCommand.ExecuteNonQuery();

vSql="SELECT [NodeID] FROM [Nodes] WHERE [Serial]='" + iSerial + "'";
vCommand.CommandText=vSql;

// crashes on this line
int vRootNode = (int)vCommand.ExecuteScalar();
//-----------------------------------------------------

I get an error of "Specified cast is not valid." This is not my 
program, I am trying to learn from it,
but its not going too well since I have to be fixing errors.  I got 
this project off of codeproject to
work with.

Is anyone able to tell what the problem is by looking at these few 
lines of code?


Thanks
John