Re: ANSI escape sequences in console apps don't work, help!
At the risk of getting toasted by Mr. Johnson, I will hazard a guess at the answer. I realize Mr. Johnson is tired of guesses, but I believe this guess is an educated one.
With MS C 6.0, what you created was a DOS application, which uses a config.sys file (or some equivalent thereof) even in Windows NT. With Visual C++ 4+, you're no longer creating a DOS application, you're creating a 32-bit console application, which is a different beast.
Apparently, a 32-bit console application does not support ANSI sequences, while a character-mode DOS application still does. Why doesn't a console application support ANSI? I can't answer that one. How do you convince it to support ANSI? I can't answer that either. But I believe my explanation about why it works with MS C 6.0, but does not work with Visual C++ 4+ is correct.
S_E_D
Re: ANSI escape sequences in console apps don't work, help!
In MSVC on-line help:
------ Begin Excerpt ----
"MSVC/MSDN Article ID: Q101875
How to Enable ANSI.SYS in a Command Window
Last reviewed: October 6, 1997
Article ID: Q101875
The information in this article applies to:
Microsoft Windows NT versions 3.1, 3.5, 3.51, *4.0* <<---- Will this help?
....
"
---- End Excerpt ----
Regards,
Paul McKenzie
Re: ANSI escape sequences in console apps don't work, help!
Thank you but, no that does not help.
I cannot find the article you are refering to.
Have you been to my home page lately?
Home page: http://www.geocities.com/SiliconVall...5230/index.htm
Re: ANSI escape sequences in console apps don't work, help!
Re: ANSI escape sequences in console apps don't work, help!
I am linking to the protect mode libraries in MSC 6.0 not the real mode.
When running CMD.EXE it works.
If I run COMMAND.COM is gives me an error.. "This program cannot be run in dos mode."
Therefore, I am running NOT in a real mode window, but a 32bit CMD Window.
What sayist thou to that?
Have you been to my home page lately?
Home page: http://www.geocities.com/SiliconVall...5230/index.htm
The CORRECT answer. Finally!
You win! You are so helpful. Thank you! THAAAANK YOOOOU!!!
I see, as I suspected, there is a big whole in the Win32 Console App. from your most excellent help!
http://support.microsoft.com/support.../q101/8/75.asp
"Windows NT does not support ANSI escape sequences in Win32 Console applications."
Thanks you Microsoft (Bill Gates), you F'd me again, nice job, ouch! It must be nice to be you...
Have you been to my home page lately?
Home page: http://www.geocities.com/SiliconVall...5230/index.htm
Re: The CORRECT answer. Finally!
Have a look at the console API. You can do nearly everything
with it that you could with the escape sequences.
There is a wrapper class on this site here :
http://www.codeguru.com/misc/console.shtml
VC also has a fairly good sample called console that
demonstrates the possibilities. Good Luck.
Re: The CORRECT answer. Finally!
What I find amazing, is that it took me all of maybe 5 minutes to locate this information on the internet and in the MSDN info... Perhaps if you'd actually looked for any of this information yourself, instead of relying on strangers to do your legwork - you wouldn't be quite so cranky. Even after I gave you the Q numbers associated with the relevent Knowledge Base Articles, you weren't able to find them without someone actually having to show you where to look for it.
Perhaps before you get so upset with everyone here and Mr. Gates, you should look inward at your own faults... and rather than expecting everyone else to do your work for you -- do a little research yourself.
Yours sincerely
Rail Jon Rogut
Recording Engineer/Software Developer
Rail Jon Rogut Software
[email protected]
http://home.earthlink.net/~railro/
Re: The CORRECT answer. Finally!
Technically I win. The article that I told you about is the very same article that Gomez directed you to look at. All you needed to do was open the VC 6.0 help, enter "Q101875" in the Search, and you would have found the article. You didn't even have to get on the Internet to find it. Unless you have a bootlegged copy of the VC 6.0 CD by itself and not the full package, this info was just a few mouse-clicks and keystrokes away.
Regards,
Paul McKenzie
Re: ANSI escape sequences in console apps don't work, help!
This thread has already concluded that Win32 console applications do not support ANSI escape sequences. If the application MSC6.0 built DID support ANSI, then it must not have been a Win32 console application. Exactly what kind of application it built will, of course, depend on your project settings, but I believe we can safely conclude that it was not a Win32 console application. The only other kind I know of is a character-mode DOS application (whether real or protected). Is it possible that MSC6.0 generated a 32-bit, protected-mode DOS application for DPMI when you linked to protected-mode libraries?
I'll admit. There are some weak links in my logic, so my conclusion may be faulty. But even the knowledgebase article hasn't explained why your original application worked.
S_E_D
Re: The CORRECT answer. Finally!
Post deleted by Chris Maunder