void CGraphWnd::ClearGraph(int graphnum, BOOL bRedraw) { CGraphProps* graph; if (graphnum != -1) { graph = GetGraph(graphnum); if (graph == NULL) return; graph->RemoveAll(); } else { int index; graph = GetFirstGraph(&index); while (graph!=NULL) { graph->RemoveAll(); graph = GetNextGraph(&index); }; }; if (graph_frame != NULL) { SGraphChange sgc; sgc.graphnum = graphnum; sgc.bRedraw = bRedraw; sgc.main_wnd_ptr = this; graph_frame->UpdateViews(GRAPH_GRAPH_CLEARED, &sgc); }; }