Link to home
Start Free TrialLog in
Avatar of jinogeorge
jinogeorge

asked on

Menu creation

How can we create dropdown Menu(like in windows) using C language (not the console menu).
Operating system: DOS
Compiler:TURBO C++
Please give me explanation with appropriate examples.
ASKER CERTIFIED SOLUTION
Avatar of Paul Maker
Paul Maker
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
doing it in windows with real menu is much more difficult, and besides you can not do it just in C, you will need to use the API of the OS your are on
Avatar of obg
obg

Do you want mouse interaction as well? You need to tell us what OS and compiler you are using. Borland has pretty good functionality for DOS applications...
Avatar of jinogeorge

ASKER

I explicitly mention that i want the dropdown menu using C or C++.not the console menu.Please give me the proper example for dropdown menu
use visual C++ MFC then its so easy
And I think both makerp and I explicitly mentioned that we need to know what OS and compiler you are using. This can not be done using standard C or C++!
you are asking for a hard time, use a class lib such as mfc or you can use the opertaing systems API to create the window items
makerp, who is asking for a hard time...?
the question asker, i no longer see the point of re-inventing the wheel. practically every plaform has a class library and/or visual compilers that automate GUI apps.
I agree. That's why I keep asking for OS/compiler... ;-)
>>I agree. That's why I keep asking for OS/compiler... ;-)
The OS an the compiler is stated in the question.
This user also has an open question under the C++ area.

jinogeorge: Forget Turbo C/C++ when using Windows.  Turbo is fine for DOS.  You need to get a serious compiler, such as Visual C++.  Otherwise you'll be trying to reinvent the wheel and asking more questions here than you have points to pay for.
What is it you want to do? Have a menu in a Windows application or have a drop down menu in a box in a console application?
wants to use only keyboard or mouse too?
graphical mode or text mode?
amit
He said a drop down window LIKE in Windows - he could mean the pseudo Windows interface programs used to have before Windows OR he could mean he wants a menu in a Windows program.

use the BGI
If you insist on using DOS as your operating system and Turbo C++ as your compiler then you are going to have an extremely large project on your hands.  You may get part way finished and then find out that you have run out of system resources.

As everyone has stated in one way or another, you will be reinventing the Windows GUI.  Not only is that silly but it may get you in warm water with our friends in Redmond.

Do you still want to do this project in Turbo C++ running under DOS, even after being told explicitly that it is A Very Bad Idea?
it can be done.... yeah, it's gonna be hard work but dropping into graphics mode and using graphics libraries would enable this to be accomplished....

trouble is, i personally don't have time to give an example right now....

interesting request though....

ps. if you ever get to the stage where you completely design a new GUI say, Microhard Doors instead of Windows then i'll back you all the way.... perhaps we can design the bugs first....
Good idea, t0t0!  And when it gets finished, let's put it in the public domain to really irritate you-know-who!
absolutely!!! i'll go along with that Ernest....perhaps we can draw upon your field of expertise and employ you to design the voice activated GUI bit so that we don't have to use 'ergonomic' mice....

i think the first lines of code should be....

#include<platform.h>
.
.
speech main(speech){

  if (system.platform == INTEL_640K_LIMIT)
    system.crash;

  if (system.hardware_interrupts < 32)
    system.crash;

  if (system.software == MICROSOFT)      //may not be necessary
    system.crash;

  if (system.addressing == SEGMENTED_ADDRESSING)
    system.crash;

  if (system.processing != TRUE_MULTITASKING)
    system.crash;

  return AI.greet(IndetifyUser(argv[1]))

  .
  .
}



Easier than that.  We'll use the Psychic Interface.  Then the user will just have to THINK of what they want to do.  The Psychic Interface will be available in the second quarter.  Reserve yours now by sendng USD 999.99 to ...
hi jinogeorge
you didn't responding?
how can we know what you exactly want?
keep in touch...
jinogeorge may have decided that everyone is right.  If I were he I'd request that the question be deleted.  But that's just me.
nonsense jinogeorge, the guy is looking for an algorithm....

the actual method for drawing the lines will obviously differ across different hardware platforms, be it character-based or in graphics mode....

naturally, any such algorithm should work on the PC say, in DOS character-base mode, which could then be ported across to the target hardware....


hmmm.... seems you're the originator of this question....

i'll have to give you an answer to your query.  at the moment though, i can't seem to focus on the theory part so i'll hold off for a day or so....
SORRY, WRONG COMMENT FOR THE WRONG QUERY.... THIS WAS MEANT FOR ANOTHER QUESTION AND POSTED HERE ACCIDENTALLY....

IGNORE THESE LAST THREE COMMENTS....

:)
use FAR Pointers get the VDU Address
where in each character has two bytes ,one byte for the char and the other for background color....

so write your own functions to generate the menu....

its all logic,
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
https://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:
PAQed with A grade to makerp

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Sunny
EE Cleanup Volunteer