C语言转换问题

weixin_42025879 2018-07-23 10:53:58
6、如何用代码将TeeChart的y轴分段?

答:请参考以下代码:

// change the Left axis properties
Steema.TeeChart.Axis axis = this.tChart1.Axes.Left;

axis.AxisPen.Color = Color.Red;
axis.StartPosition = 0;
axis.EndPosition = 32;

// create custom axes. This can be done at design-time
Green = new TeeChart.Axis(tChart1.Chart);
this.tChart1.Axes.Custom.Add(Green);
Green.AxisPen.Color = Color.Green;
Green.StartPosition = 34;
Green.EndPosition = 65;

Blue = new TeeChart.Axis(tChart1.Chart);
this.tChart1.Axes.Custom.Add(Blue);
Blue.AxisPen.Color = Color.Blue;
Blue.StartPosition = 67;
Blue.EndPosition = 100;
怎么在VC中写这些代码呢,老是出现编译错误
...全文
330 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_42025879 2018-07-26
  • 打赏
  • 举报
回复
引用 3 楼 colinfang2006 的回复:
这是C#代码吧,如果你想移植到C,必须定义 Steema.TeeChart.Axis这些结构
老铁,麻烦教我一下,我该怎么定义呢?
636f6c696e 2018-07-25
  • 打赏
  • 举报
回复
这是C#代码吧,如果你想移植到C,必须定义 Steema.TeeChart.Axis这些结构
weixin_42025879 2018-07-24
  • 打赏
  • 举报
回复
引用 1 楼 colinfang2006 的回复:
编译错误就把编译错误贴上来啊
--------------------Configuration: wwwwwww - Win32 Debug-------------------- Compiling resources... Compiling... wwwwwwwDlg.cpp C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(158) : error C2065: 'Steema' : undeclared identifier C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(158) : error C2228: left of '.TeeChart' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(158) : error C2228: left of '.Axis' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(158) : error C2146: syntax error : missing ';' before identifier 'axis' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(158) : error C2065: 'axis' : undeclared identifier C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(158) : error C2228: left of '.tChart1' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(158) : error C2228: left of '.Axes' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(158) : error C2228: left of '.Left' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(160) : error C2228: left of '.AxisPen' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(160) : error C2228: left of '.Color' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(160) : error C2228: left of '.Red' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(161) : error C2228: left of '.StartPosition' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(162) : error C2228: left of '.EndPosition' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(165) : error C2065: 'Green' : undeclared identifier C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(165) : error C2061: syntax error : identifier 'TeeChart' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(166) : error C2228: left of '.tChart1' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(166) : error C2228: left of '.Axes' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(166) : error C2228: left of '.Custom' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(166) : error C2228: left of '.Add' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(167) : error C2228: left of '.AxisPen' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(167) : error C2228: left of '.Color' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(167) : error C2228: left of '.Green' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(168) : error C2228: left of '.StartPosition' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(169) : error C2228: left of '.EndPosition' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(171) : error C2065: 'Blue' : undeclared identifier C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(171) : error C2061: syntax error : identifier 'TeeChart' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(172) : error C2228: left of '.tChart1' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(172) : error C2228: left of '.Axes' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(172) : error C2228: left of '.Custom' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(172) : error C2228: left of '.Add' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(173) : error C2228: left of '.AxisPen' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(173) : error C2228: left of '.Color' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(173) : error C2228: left of '.Blue' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(174) : error C2228: left of '.StartPosition' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(175) : error C2228: left of '.EndPosition' must have class/struct/union type C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC\Desktop\新建文件夹\wwwwwwwDlg.cpp(215) : error C2143: syntax error : missing ';' before '}' C:\Users\PC
636f6c696e 2018-07-24
  • 打赏
  • 举报
回复
编译错误就把编译错误贴上来啊

69,371

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧