CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2003
    Posts
    43

    color for texts?

    is it a way to print the text with color in console such as DOS??

    thanks for reply
    Regards

    sato

  2. #2
    Join Date
    Sep 2002
    Posts
    924
    I haven't tried this but SetConsoleTextAttribute sounds like it does what you want.

    Russ

  3. #3
    Join Date
    Sep 2003
    Posts
    43
    i have to do it in VC++ ??

  4. #4
    Join Date
    Sep 2002
    Posts
    924
    Originally posted by satoshi
    i have to do it in VC++ ??
    I don't understand what that means...

    You don't want to do it in VC++?

    It is not a console application, rather you want to make your own window similair to a color console (use SetTextColor(), etc)?
    Last edited by RussG1; March 7th, 2004 at 08:26 PM.

  5. #5
    Join Date
    Apr 1999
    Posts
    27,449
    Originally posted by satoshi
    i have to do it in VC++ ??
    No. Those console functions are Windows API functions. You are using the Windows API, right? I would suspect so, since you asked the question in the "C++ and WinAPI" forum.

    Practically any Windows-based C or C++ compiler can be used, including Visual C++, Borland, CodeWarrior, etc. You can even call those functions from Visual Basic or Delphi.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; March 7th, 2004 at 10:34 PM.

  6. #6
    Join Date
    Feb 2004
    Posts
    21
    Satoshi: is it a way to print the text with color in console such as DOS??
    Yes, it has. And it is with SetConsoleTextAttribute as RussG1 wrote.
    I've done only a small message bar(in red) and status bar(blue or ... i don't remember) on the bottom of the console.
    If you want I can give you some code or ..
    if i can help you with something else???

  7. #7
    Join Date
    Sep 2003
    Posts
    43
    Originally posted by defiler_z
    Yes, it has. And it is with SetConsoleTextAttribute as RussG1 wrote.
    I've done only a small message bar(in red) and status bar(blue or ... i don't remember) on the bottom of the console.
    If you want I can give you some code or ..
    if i can help you with something else???

    i better give a try 1st

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured