[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to make my Menu Colored.

Posted on 2005-04-14
6
Medium Priority
?
277 Views
Last Modified: 2010-04-15
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);
      
}
0
Comment
Question by:djhex
6 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 13788173
what platform?
0
 
LVL 10

Author Comment

by:djhex
ID: 13788196
I have windows xp
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 13788205
using VC++?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
Mercurius0 earned 1500 total points
ID: 13788830
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
 
LVL 10

Author Comment

by:djhex
ID: 13789844
I am using DevC++  of bloodsheed
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
Suggested Courses
Course of the Month20 days, 10 hours left to enroll

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question