I'm not sure I understand the question - are you saying that image annotations are not included when you copy an image of the graph to the clipboard? If so, try this sample code and see if this works:
// Assuming that the class has a m_graph member that is a CNiGraph
// Add an image annotation.
CNiAnnotation annotation = m_graph.Annotations.Add();
CNiShape shape = annotation.Shape;
shape.Type = CNiShape::Picture;
shape.Image.Url = _T("C:\\Windows\\Zapotec.bmp");
shape.Image.Reload();
// Copy an image of the graph to the clipboard.
CNiPicture pic = m_graph.ControlImage();
::OpenClipboard(NULL);
::EmptyClipboard();
::SetClipboardData(
CF_ENHMETAFILE,
::CopyEnhMetaFile(reinterpret_cast(pic.Handle), NULL)
);
::CloseClipboa
rd();
After this code runs you should be able to paste a bitmap of the control to Paint and see the graph with the image annotation. If this was not your question or this did not resolve your problem, please post a reply with additional information and sample code that demonstrates how to reproduce your problem. Thanks.
- Elton