|
I have a graphics plotting program that doesn't have much of an 'on-the-fly' input output interface. the user either has to write a script file or has to use the limited options in the dialog boxes.
softwares like AutoCAD and the FEA software like ABAQUS, NASTRAN etc.. have a text box at the bottom of their screen thru which users can enter commands and the program outputs stuff onto an output textbox.
can someone tell me or point me to some place that tells me how to best implement this sort of thing ?
the I/O routines in my program use the iostream classes- basically reads commands from some script file and prints out stuff to some output file or cout. e.g. a typical routine would be:
void readMesh(istream*, ostream*, other arguments) {}
now, the GUI uses MFC and part of my confustion is how do i redirect all this program ouput that goes to the (ostream*) to go to a textbox in the GUI instead, without making major or atleast tedious mods to the existing code. and similarly, how do i redirect input from a textbox to go to an istream ?
is this even possible?? if not, i guess i will have to change the whole program structure, but even then i would like to know how it is implemented in the big commercial softwares like autocad so i get it right atleast this time.
thanks
|