R - how to draw graphics in an existing window created by another application

I wrote a Windows application in C ++, I want to do data analysis in R, but bring the graphics to the window of my application, so I call the R-procedure in my application and can send a window handle to R but I do not know how to set the window as graphics device R.

dev {grDevices} functions provide control over several graphic devices, but I think that dev.set () or windows () do not work in this situation, what should I do?

Thanks!

+4
source share
1 answer

You must implement a hook that redirects the R-chart to the application window. I did not do this in C ++ as an application, but C # code for this is essentially the standard window API.

It uses a hook code written by Dino Esposito around 2004.

http://rdotnet.codeplex.com/workitem/7

+5
source

All Articles