Description: Many of you might have seen the numeric input fields in most commercial CAD and scientific applications that facilitate the user to write mathematical expressions. This is to allow the user to use the edit box or the spinner box as a calculator on the fly. I was very much fascinated with this functionality and always wanted to easily have it in my applications. Writing a parser was a long job. When I just started learning Python, I came to know that it was a beautiful calculator by itself. You just need to type the expression on the command line and return-- you get the answer for any math function the C programmer is familiar with. After a long search on the net and the Python API doc, I finally came to know how to simply send a string to the interpreter and retrieve the results. I leveraged this ability of the Python API to embed it into a dialog box.
File list (Check if you may need any files):
PyEmbedMFC\PyEmbedMFC
..........\..........\PyEmbedMFC.cpp
..........\..........\PyEmbedMFC.h
..........\..........\PyEmbedMFC.rc
..........\..........\PyEmbedMFC.vcproj
..........\..........\PyEmbedMFCDlg.cpp
..........\..........\PyEmbedMFCDlg.h
..........\..........\ReadMe.txt
..........\..........\res
..........\..........\...\PyEmbedMFC.ico
..........\..........\...\PyEmbedMFC.rc2
..........\..........\resource.h
..........\..........\stdafx.cpp
..........\..........\stdafx.h
..........\PyEmbedMFC.sln
..........\PyEmbedMFC.suo
PyEmbedMFC