Visual C ++ save a photo from a panel with drawings

0

I'm working on a simulator, where I have a panel (simulationArea) and moving objects, as well as drawings that are made of some lines drawn between points representing the routes to be traveled by such moving objects. However, my problem is that by giving the command below:

Bitmap ^ printScreen; simulationArea-> DrawToBitmap (printScreen, simulationArea-> ClientRectangle); printScreen-> Save ("log \ Simulation.jpg", System :: Drawing :: Imaging :: ImageFormat :: Jpeg);

When executing the above command, it correctly takes the photo of all objects contained in the panel, however drawing drawings do not appear in the saved images.

For example, in the image IhavemyprintScreendonemanually,noticethatithasthelinesdrawn(greenandred).Alreadyintheimage I have the print done by my program, which does not correctly save the green and red lines, they are deleted.

Can someone tell me how to stay with the green and red lines in the save method I'm using, or point me to the best solution?

Thanks for the strength.

    
asked by anonymous 11.07.2018 / 01:28

0 answers