Display python script output into MFC window
Hello,
As you already helped me to plot a chart in python calling it in c++.
the current output is into the console.
Now I want to explore the option of moving the output plot into MFC window dialogue.
Googling didnot help me much.
Could you please advice me how to go about this ?
thanks a lot
pdk
Re: Display python script output into MFC window
Is it possible to redirect this output to some file?
Re: Display python script output into MFC window
Quote:
Originally Posted by
VictorN
Is it possible to redirect this output to some file?
Thankyou Victor for looking into this. As of now I have not tried to redirect. But i can try and update.
Re: Display python script output into MFC window
Quote:
Originally Posted by
VictorN
Is it possible to redirect this output to some file?
And to do what with this file ? After all, the request is to represent data (from a file or whatever) into a graphical form, form that Python is deliver into a Python windows (I guess, didn't check it). I am asking this because I don't understand what is the link between a file where you have the chart data and chart window, which is now delivered with a Python window.
Re: Display python script output into MFC window
Just to add some more inputs, when googling i found the following articles: (Not explored them yet). May be if anybody knows about these articles, will be helpful to post here:
https://www.codeproject.com/Articles...-in-MFC-Dialog
https://discourse.matplotlib.org/t/c...e-mode/10279/4
Re: Display python script output into MFC window
Quote:
Originally Posted by
mesajflaviu
And to do what with this file ? After all, the request is to represent data (from a file or whatever) into a graphical form, form that Python is deliver into a Python windows (I guess, didn't check it). I am asking this because I don't understand what is the link between a file where you have the chart data and chart window, which is now delivered with a Python window.
The source is python getting output to a console, not a window.
Re: Display python script output into MFC window
In my opinion you are on the wrong path here.
If your app is MFC, you need to graph into a window that mfc has control over. Given this, having python run in a separate process and outputting a plot into a console window does not help you if the goal is to display a plot inside an MFC app.
Find an MFC example that shows you how to plot. Another approach is to find a COM control (i.e. activex control) that can plot an host it inside the MFC app.
You see an MFC app is designed to be a COM container and can host windows of COM controls (like you could host a window with an Excel chart for example).
However, it isn't designed to host a console with with output from python.