From: Tor L. <tm...@ik...> - 2010-03-26 10:57:06
|
> As far as I know, SetConsoleTextAttribute only works (has any effect) on cmd.exe, Better to say, it has effect only on console windows. (As one can see from its name.) Cmd.exe is just a program that often is run in a console window, but it isn't cmd.exe that implements the functionality of a console window. (On Windows 7, the process that implements console window functionality is conhost.exe, and earlier it was implemented directly by csrss.exe, the Win32 subsystem. No doubt is csrss.exe still involved in some way but not as directly as before.) When for instance bash.exe is running in a console window, no cmd.exe is involved but bash or some console executable started from bash (and thus using the same console window) can use console API successfully. And the other way around, you can run cmd.exe in a rxvt window but no console window is then used and console APIs will fail. --tml |