There is a program (Windows, on VC ++, but I think it does not matter), which opens a window, interactively allows you to open a file with data, set calculation parameters, calculate, display the results. In short, the usual calculated application.
But sometimes there are a number of data files for which the calculation parameters are the same, and you just want to start the program with the keys in the batch file, let it count.
I see such options.
To make the second program on the basis of the first, in principle, is easy. But then you need to constantly coordinate the source code, and this is fraught with errors, unnecessary work, etc. etc.
Make a calculated console program, which is somehow secretly called when necessary calculations from the window. How to correctly call it in the background, so that it does not try to open the console?
Try to allocate the calculated part in the DLL, which is loaded from the console and from the window program. Minus - I use wxWidgets and DialogBlocks, and I can’t figure out anything, as in the DialogBlocks project, in addition to doing
exe, alsodll, and I don’t want to keep two separate projects either.
Of course, ideally - so that the program on the transferred keys itself made the decision on how to start it - as a console or as a window, but I have no idea how to achieve this.
What do you think, what approach will be the best (simpler and more reliable) of all?