954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Graphical Dos Interface

Does anyone know how to give a GUI look to your C++ "Console Application".

I cannot use Win32 API or any other template except the console application because I use Turbo C++ 3.0 IDE for development and I want my Application to be platform independent while using WIN32 API will limit it to Windows.

I am clear with arrays,switch,if,else if etc.

If possible could you please give an example.

themaster
Newbie Poster
18 posts since May 2009
Reputation Points: 3
Solved Threads: 2
 

Well you get built in options for the things you have asked both in Dev-Cpp and also Code Blocks...Try them.

csurfer
Posting Pro
568 posts since Jan 2009
Reputation Points: 485
Solved Threads: 88
 

> while using WIN32 API will limit it to Windows.
You're even MORE limited by your choice of compiler!.

You can build a simple window effect using curses
http://pdcurses.sourceforge.net/index.html

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

Does anyone know how to give a GUI look to your C++ "Console Application".

I dont wanna use Win32 API or any other template except the console application because I use Turbo C++ 3.0 IDE for development and I want my Application to be platform independent while using WIN32 API will limit it to Windows.

I am clear with arrays,switch,if,else if etc. If possible could you please give an example.


Same Question as above:
is it possible to design console base front end with Microsoft Visual C++ ?? console base application?
is there any plz help and guide.

yun
Light Poster
42 posts since May 2009
Reputation Points: 10
Solved Threads: 2
 
> while using WIN32 API will limit it to Windows. You're even MORE limited by your choice of compiler!.

I am always ready to shift to Visual C++ Express but not until I have the answer to this question.

themaster
Newbie Poster
18 posts since May 2009
Reputation Points: 3
Solved Threads: 2
 

Sorry, do you want me to mention curses again?

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

Please mention some link of curses tutorials.

yun
Light Poster
42 posts since May 2009
Reputation Points: 10
Solved Threads: 2
 

Please mention some link of curses tutorials.

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 
Please mention some link of curses tutorials.

I dont know which one to download from where and how to use it.

themaster
Newbie Poster
18 posts since May 2009
Reputation Points: 3
Solved Threads: 2
 

>I dont know which one to download from where and how to use it.
So, STFW. .
Salem has already told you twice to use curses( or ncurses or pdcurses) but look at you.... you are not even bothered.

siddhant3s
Practically a Posting Shark
816 posts since Oct 2007
Reputation Points: 1,486
Solved Threads: 140
 
Please mention some link of curses tutorials.

To the OP and every other noob who is to lazy to use a search engine:

http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/
And all your ncurses related questions are covered here, including where to get it.

Wow, do you know how extremely difficult it was to get this link?
(It took me exactly 1 second by typing it in in Google and pressing the ENTER button on my keyboard :P)

tux4life
Nearly a Posting Maven
2,350 posts since Feb 2009
Reputation Points: 2,134
Solved Threads: 243
 

Does anyone know how to give a GUI look to your C++ "Console Application".

I cannot use Win32 API or any other template except the console application because I use Turbo C++ 3.0 IDE for development and I want my Application to be platform independent while using WIN32 API will limit it to Windows.

I am clear with arrays,switch,if,else if etc. If possible could you please give an example.


A graphics.h header file and set of .chr and .bgi files are needed to give GUI look.

#include <graphics.h>
...
..

int main()
{
    int gd=DETECT;  // Graphics Driver
    int gm;                 // Graphics Mode
  
    initgraph(&gd,&gm,"c:\\tc\\bgi");  // c:\\tc\\bgi - path for .chr and .bgi
    circle(200,200,30);
    cin.get();
    closegraph();
   
  return 0;
}
__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

why don't you just use one of the platform independent GUI 3d party libraries, such as wxWindows , GTK+ , or QT . I think wxWindows and GTK+ will both work with VC++ 2008 Express (although I have not tried it). QT is its own IDE which works with nearly any 32-bit compiler.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 
I cannot ____ because I use Turbo C++ 3.0 IDE


are you stuck in a time machine? or is it still 1990, where you live?

throw that shit out, and join the 21st CenturyIf possible could you please give an example. Code::Blocks (free)
Visual C++ express (free)
Bloodshed Dev C++ (free)

I am always ready to shift to Visual C++ Express but not until I have the answer to this question.


I am always ready to answer your question, but not until you get a modern compiler that isnt gimped

of course, then you will start having real questions for real problems, and we can just close this thread.


.

jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
 

>how much more negative can your rep go? keep posting this junk, and we'll find out! whee! - jephthah
>Unportable rubbish! - tux4life
>How much of your immature programming would you post here. - siddhant3s

Thanks for your comments. I posted the code as per poster's question.

__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

^ ahaha.. your rep just went from -49 to 0 with one pity post by Dragon. LOL.

now look, here's your chance, adatapost: don't screw it up. think before you post. and get rid of your Turbo C compiler.

jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
 
I am always ready to answer your question, but not until you get a modern compiler that isnt gimped


Then stop replying posts you have no intention of of addingconstructive responses to!

Adatapost, you do not have to use a jephthah-approved compiler.

WaltP
Posting Sage w/ dash of thyme
Moderator
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
 

it's not "jephthah approved". it's "industry acceptable".

i felt my post was quite constructive: I gave several links to a variety of modern and free standard-C compilers without prejudice.

i mean, 3.0? we're talking vintage 1990. there's been a few changes to compilers and the C++ language in the past 20 years :)

but okay. you're right, i'm over the line again with my sarcasm and tone. apologies to those involved.

.

jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
 

Then stop replying posts you have no intention of of adding constructive responses to!

Adatapost, you do not have to use a jephthah-approved compiler.


Agreed, but if you use such an old dinosaur compiler then you're nearly always forced to write non-jephthah approved code :P
In my opinion if you want to control the much loved powers of the C++ language, you should use a standard compiler, not such an old one, why else was C++ standardized ?? (<- yes Narue, I know you're going to give feedback on this :P)

tux4life
Nearly a Posting Maven
2,350 posts since Feb 2009
Reputation Points: 2,134
Solved Threads: 243
 

I was to be with adatapost if he would have added a line such as ``This is what you want but please stop using a pre-historic compiler".

The fact is that the graphic.h header file won't never give OP, the curses look. The only thing it will do is to make the code Huge and un-tangible ( of course making it unportable too). Do think we should create our own rectangles and squares to create windows and buttons?

I know this character here which mostly posts Turbo C++ compatible code. I don't care what you do when you are with you: use turbo C ++ or any other older non standard compiler. But when you are in a community, please (at least try to) obey standards.

The point I want to highlight is ( which has now become difficult to prove) that the suggestion of graphic.h was not given after reading the OP's "I am on turbo C++" but was to be the default answer by him anyways (I told you it is difficult to prove this now.) Furthermore, the use of graphic.h won't do any good on Turbo C++ either.

I know the Green rep to him (after 3 red one) must be a matter of sympathy. If it was not, there was no need to neutralize the red dot.

> Then stop replying posts you have no intention of of adding constructive responses to!
>Adatapost, you do not have to use a jephthah-approved compiler.
What a shame!! You should appretiate the initiative taken by jephthah to turn OP as well as Adatapost into a standard code writer. Not everyone has this courage to say upon. He is not posting any destructive posting here. His (jephthah's) posts seems to be very valuable to me in this whole thread (after Salem's post).

Portable coding should be encouraged and never should be discouraged. The use of such creepy compilers make their user creepy and spoil the name of C++ developers, no doubt Linus remarked when asked why didn't he chose C++ to be the language for his kernel:
C++ made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do *nothing* but keep the C++ programmers out, that in itself would be a huge reason to use C.

Start this movement: Migrate to standards. Migrate to Life. :)

siddhant3s
Practically a Posting Shark
816 posts since Oct 2007
Reputation Points: 1,486
Solved Threads: 140
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You