• C

How to make my Menu Colored.

I have this code for a Console program I want to put colors on numbers and * chars

void printmenu(void)
{
    clrscr();
      int choice;
      do
      {
          printf("                                  Menu                              \n\n");
          printf("**********************************************************************\n");
              printf("* 1. SumarGloar                        2. SumarDouble                *\n");
              printf("* 3. RestarFloar                       4. Restar Double              *\n");
              printf("* 5. PromoverFloatADouble              6. SonIgualesFloat            *\n");
              printf("* 7. EsMayorFloat                      8. EsMayorOigualFloat         *\n");
              printf("* 9. EsMenorFloat                      10. EsMenorOIgualFloat        *\n");
              printf("* 11. Son Diferentes Float             12. Son Iguales DOuble        *\n");
              printf("* 13. Es Mayor Double                  14. Es Mayor o Igual Double   *\n");
              printf("* 15. Es Menor double                  16. Es Menor o  igual double  *\n");
              printf("* 17. Son Diferentes Double            18. Promover Entero a Float   *\n");
              printf("* 19. Promover Entero a Double         20 Salir                      *\n");
              printf("**********************************************************************\n");
                     
                   
             scanf("%d",&choice);
 
             switch (choice)
             {
                  case 1: sum();
                            break;
                            
                  case 6: menuSonIgualesFloat();
                            break;
                  case 20:
                        exit(0);
                      default: printf("Escoga otra opcion parce\n");
                      
                          break;
             }       
 
      } while (choice != 3);
      
}
LVL 10
djhexAsked:
Who is Participating?
 
Mercurius0Connect With a Mentor Commented:
You could use _settextcolor()
An example and color values can be found at:
http://www.clipx.net/ng/msc60/ng9eb14.php

If that isn't what you're looking for you may be
able to find something here:
http://www.clipx.net/ng/msc60/ng74e53.php

Don't forget to include <graph.h>
0
 
sunnycoderCommented:
what platform?
0
 
djhexAuthor Commented:
I have windows xp
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
sunnycoderCommented:
using VC++?
0
 
djhexAuthor Commented:
I am using DevC++  of bloodsheed
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.