- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am attempting to convert an old 16 bit Fortran program to run
in CVF. It used a small number of assembler routines to provide
the ability to read direction keys, and to print characters at a specific row and column on the screen. A console project seems like it would be the
easiest conversion path, and I've found routines that provide
most of what I need (PEEKCHARQQ, GETCHARQQ, and
SetConsoleCursorPosition). I can't find any way to control the
foreground and background color used to print a character. It looks like
you can do this in a QuickWin application, but I'm afraid that this will
cause complications with the character trapping that I'd just as soon not
fool with. Is there a way to set the colors used for text in a console application?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SetConsoleTextAttribute
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use GetStdHandle( STD_OUTPUT_HANDLE) to get the handle for the console.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page