-
May 26th, 2021, 10:51 AM
#1
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
-
May 27th, 2021, 01:16 AM
#2
Re: Display python script output into MFC window
Is it possible to redirect this output to some file?
Victor Nijegorodov
-
May 27th, 2021, 03:50 AM
#3
Re: Display python script output into MFC window
 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.
-
May 27th, 2021, 05:43 AM
#4
Re: Display python script output into MFC window
 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.
-
May 27th, 2021, 06:54 AM
#5
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
-
May 27th, 2021, 05:51 PM
#6
Re: Display python script output into MFC window
 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.
-
May 27th, 2021, 06:02 PM
#7
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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|