Question

As some DOS application, how to display a pull-down menus in C with ASCII?

(and can be controlled by arrow keys)

like this:

+--------------------              +--------------------
| File | Edit | Help ...           | File | Edit | Help ...
+----------+---------              +------+----------+--
| New (N)  |                              | Cut (X)  |
| Open (O) |               AND            | Copy (C) |
| Save (S) |                              | Undo (U) |
+----------+                              +----------+

Which library can I use?

Was it helpful?

Solution

I would suggest using a library like ncurses. Doing this from scratch is pretty tough, but, if you really want, you need to use a lot of printf's and functions to write a character at a certain position.

Here you will find more ncurses alternatives for windows: NCurses-Like System for Windows

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top