473,396 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to implement a menu ?

hey, i'm having this problem when i'm trying to implement menu
capability in my program, using direction key UP and DOWN to move the
a bar between the menu items, press enter to select it, cudgle my
brain hardly as possibly could I just couldn't figure out how to do
this. and i'm using Visual C++ and I don't know if there's any library
functions to handle text attributes like in Borland C (textcolor()
etc.). so hope some could help me out, thanx in advance.

int scan,extended;
printf("1. log on system\n");
printf("2. log out system\n");
printf("3. inquire record\n");
printf("4. record statistics\n");
printf("5. exit system\n");
while((scan=getch())==0 || scan==0xe0) {
extended=getch();
switch(extended) {
case 0x48:
keyup();
break;
case 0x50:
keydown();
break;
default:
oops();
}

Gary.
Nov 13 '05 #1
2 3915
Hi Sugaray,
hey, i'm having this problem when i'm trying to implement menu
capability in my program, using direction key UP and DOWN to move the
a bar between the menu items, press enter to select it, cudgle my
brain hardly as possibly could I just couldn't figure out how to do
this. and i'm using Visual C++ and I don't know if there's any library
functions to handle text attributes like in Borland C (textcolor()
etc.). so hope some could help me out, thanx in advance.


You might want to check section 19 of the faq:
http://www.eskimo.com/~scs/C-faq/s19.html

Good luck,

--
Martijn
http://www.sereneconcepts.nl
Nov 13 '05 #2
"sugaray" <ru****@sohu.com> wrote in message

hey, i'm having this problem when i'm trying to implement menu
capability in my program

You can't manipulate the screen display in ANSI C, and generally you can't
use printf() with platform-specific console functions either.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: me | last post by:
I have got all my pages to comply with the W3C validator, except this one line as below. I need to keep the line (or the functionalilty) but it would be nice to implement it in a way that gives...
2
by: Erich | last post by:
Sort of a beginner question - What might be the best way to design a windows form that contains a menu, whose items are loading different content in the form. I'm used to do that via panels...
4
by: Amil | last post by:
// there are 2 forms inheriting from EditorTemplate // ItemsEditor and CategoriesEditor public EditorTemplate CreateForm(string inheritedFormName) { // EditorTemplate editor; // makes editor in...
8
by: Nad | last post by:
Hello, I'm new to web development. How do you create a main menu in a Web Application? Is there such a concept like main menu as there is in windows forms? If not what do you replace it with? ...
0
by: MilanB | last post by:
Hello Which tehnique is recommended to use to implement left or right side menu on multiple pages, within application? Any links or examples? Thanks. MilanB
0
by: Vikash Yadav | last post by:
hi all I want to implement my own what's this help as a menu item and when i click on this and then right click on any contorl the Pop-up should come and provide the help. is there any solution...
3
by: Andrew | last post by:
Hello, friends, I was asked to implement a .aspx page with drop down menus. When a mouse pointer moves over a menu bar, a drop down list containing sub-menus will show up. Thus a user may select...
9
by: Mike Hofer | last post by:
BACKGROUND: We've designed a Website for a client that will be deployed across multiple physical locations. The site will be hosted from a corporate NOC, and administered by the IT group there. ...
0
by: JustyAI | last post by:
Hi, I am trying to implement a multi language GUI. I went on several websites and found documentation on resx files. I found it interesting but i must forgot one step. I declared a resx file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.