I have a GUI C++ application (Visual Studio 2008) that needs to be converted to a console one. I don't have any experience in C programming. Mostly I use .NET. Where do I start?
Start with refactoring. Make sure that GUI is separated from business logic. Then add another interface to access this business logic: one that uses console, rather than GUI widgets.
Down-converting a GUI app is major surgery. The programming model is entirely different, a GUI app is event driven. Relying on a message loop to deliver events, processed in message handlers. And typically a bunch of controls that take care of the grunge work of taking input.
Given that you have to completely redesign the app to make it work as a console mode app and that you don't have experience with the language, writing this in a .NET language you have experience with is the best way to get it completed quickly.
Check out ncurses and readline to help you build a rich console application. You can't use them both at once , as I found out, so try ncurses if your application is more oriented toward output/display or will implement single-key interactions (hotkeys), and readline if it's more of a line-at-a-time user input situation.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.