打印

UCGUI怎么把一个数组画成波形显示出来呢?

[复制链接]
5643|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
80248876|  楼主 | 2012-5-17 11:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
下面的程序运行后没有反映,怎么回事呢
static  CallbackChild(WM_MESSAGE * pMsg)
{
WM_HWIN hWin = (FRAMEWIN_Handle)(pMsg->hWin);
switch (pMsg->MsgId) {   
GRAPH_DATA_Handle hData;
GRAPH_SCALE_Handle hScale;
WM_HWIN hGraph;  
static signed  short int wave[]=
{122,145,151,135,143,147,142,144,148,134,153,155,147,144,132,149,131,160,149,151,140,122,132,148,169,152,147,138,145,154,137,168,139,132,126,146,172,96,129,231,
139,50,199,238,42,74,269,148,5,203,265,60,70,254,198,67,147,186,131,121,178,143,138,141,157,138,143,140,154,148,134,137,133,149,147,131,124,144,151,146,128,128,
153,143,140,158,136,145,148,152,135,148,172,128,148,142,135,135,149,168,136,150,138,164,150,143,150,144,155,142,128,147,160,132,142,154,124,150,152,146,136,144,
145,154,151,140,161,143,136,139,157,146,153,149,170,127,140,143,145,159,146,143,145,152,137,149,128,143,134,137,147,132,134,128,121,142,156,142,142,133,160,141,
157,148,141,155,154,143,157,162,143,141,148,148,152,141,151,155,142,146,131,132,129,131,142,127,167,152,123,136,143,122,139,155,138,143,134,138,130,148,135,152,
157,151,144,139,127,145,154,136,142,150,149,129,146,146,142,153,140,135,147,145,142,152,128,133,112,149,130,141,154,141,139,135,138,150,128,139,152,129,147,151,
135,128,148,152,146,152,132,150,138,138,124,155,146,154,160,132,147,144,153,155,152,136,143,147,177,153,164,148,142,146,139,157,138,130,153,124,125,147,130,135,142,
135,142,147,128,131,122,140,151,137,149,146,154,154,133,135,144,133,159,158,145,140,149,133,143,139,145,156,152,152,135,146,130,148,147,157,163,135,123,173,127,74,
146,225,92,77,241,179,29,169,271,81,7,246,216,36,116,250,109,68,189,181,104,138,179,134,122,128,134,137,146,122,142,132,155,135,140,134,137,137,142,139,152,150,163,
137,155,118,147,148,140,147,153,155,144,150,137,133,137,146,150,136,135,171,138,160,150,134,139,142,145,154,127,161,152,134,139,143};   
  
case WM_PAINT:
//Handle the paint message
hGraph = GRAPH_CreateEx(5, 18, 246, 220, WM_HBKWIN, WM_CF_SHOW, 0, 0);
hData = GRAPH_DATA_YT_Create(GUI_YELLOW,392, wave, 391);
GRAPH_AttachData(hGraph, hData);
//hScale = GRAPH_SCALE_Create(25, GUI_TA_RIGHT, GRAPH_SCALE_CF_VERTICAL, 35);
//GRAPH_SCALE_SetOff(hScale, 140);//将竖坐标统一上移140,也就是统一减去140
//GRAPH_SCALE_SetFactor(hScale,0.0571428571428);//将竖坐标除以
//GRAPH_SCALE_SetTextColor(hScale,GUI_RED);
GRAPH_SetVSizeX(hGraph,600);
GRAPH_SetVSizeY(hGraph,180);
GRAPH_SetBorder(hGraph,0, 0,0,0);
//GRAPH_AttachScale(hGraph, hScale);
GRAPH_SetGridVis(hGraph, 1);
GRAPH_SetGridDistX(hGraph, 30);
GRAPH_SetGridDistY(hGraph, 30);
break;
}
}

相关帖子

沙发
airwill| | 2012-5-24 11:05 | 只看该作者
光看到屏幕初始化了, 还应该根据数据计算 XY坐标, 然后调用划线函数

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

12

帖子

1

粉丝