I have come up with a simpler solution. There is no need to use hidden separate panels anymore. Just hide the ticks by using dummy text boxes then use the following code to copy only the graph on the main panel. It is significantly simpler and works well. The result is enclosed without confusing ticks.
int bitmapID, top,left, height, width;
GetCtrlBoundingRect (PanelHandle, graph_control, &top, &left, &height, &width);
GetPanelDisplayBitmap(PanelHandle,VAL_FULL_PANEL,MakeRect (top,left, height, width),&bitmapID);
ClipboardPutBitmap(bitmapID);