void CGame::GraphReset() { m_eGraphStep = GRAPHSTEP_BEGIN; m_aiUnvisitedNodes.clear(); m_aiPathStack.clear(); m_iCurrentNode = -1; m_Graph = CGraph(); }
BOOL CDlgKalibrovka::OnInitDialog() { CDialog::OnInitDialog(); UpdateData(false); double data[MAX_DATA]; double ddata[MAX_DATA]; CRect recGraph(0,30,450,350);//(10,300,400,600); // m_Graph = CGraph("сек","Uвх", 15, 15, 0x6000033 | GRF_ORIENTVERT/* | GRF_STYLE_TYME*/); m_Graph = CGraph("сек","Uвх", 15, 15, 0x100F3/* | GRF_STYLE_TYME*/); m_Graph.Create(NULL, WS_CHILD|WS_VISIBLE, recGraph, this); for(int i = 0; i < MAX_DATA; i++) { data[i] = (float)sin(3.14*12*i/MAX_DATA + 0.9*(((float)rand())/RAND_MAX - 0.5f)); ddata[i] = i; } m_Graph.CreateBufer(MAX_DATA, data, ddata); m_Graph.SetMinMaxXDiapazon(0, 100); m_Graph.SetMinMaxF(0, 20); // m_Graph.SetSizeFontX(11); m_Graph.SetOrientFontX(false); m_Graph.SetOrientFontY(true); m_Graph.SetTypeGraph(1); m_Graph.ShowScroll(false, false); m_Graph.SetColorFieldGraph(RGB(255,255,255)); m_Graph.SetStyleLineFunc(gline); return TRUE; }