943,767 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 2288
  • C++ RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jun 10th, 2009
0

Re: Graphical Dos Interface

Click to Expand / Collapse  Quote originally posted by yun ...
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 )
Last edited by tux4life; Jun 10th, 2009 at 7:06 am.
Reputation Points: 2125
Solved Threads: 243
Postaholic
tux4life is offline Offline
2,105 posts
since Feb 2009
Jun 10th, 2009
-1

Re: Graphical Dos Interface

Click to Expand / Collapse  Quote originally posted by themaster ...
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.

C++ Syntax (Toggle Plain Text)
  1. #include <graphics.h>
  2. ...
  3. ..
  4.  
  5. int main()
  6. {
  7. int gd=DETECT; // Graphics Driver
  8. int gm; // Graphics Mode
  9.  
  10. initgraph(&gd,&gm,"c:\\tc\\bgi"); // c:\\tc\\bgi - path for .chr and .bgi
  11. circle(200,200,30);
  12. cin.get();
  13. closegraph();
  14.  
  15. return 0;
  16. }
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jun 10th, 2009
0

Re: Graphical Dos Interface

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.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Jun 10th, 2009
0

Re: Graphical Dos Interface

Quote ...
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 Century


Quote ...
If possible could you please give an example.
Code::Blocks (free)
Visual C++ express (free)
Bloodshed Dev C++ (free)


Quote ...
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.


.
Last edited by jephthah; Jun 10th, 2009 at 5:46 pm.
Reputation Points: 2143
Solved Threads: 178
Posting Maven
jephthah is offline Offline
2,567 posts
since Feb 2008
Jun 10th, 2009
2

Re: Graphical Dos Interface

>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.
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jun 11th, 2009
1

Re: Graphical Dos Interface

^ 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.
Reputation Points: 2143
Solved Threads: 178
Posting Maven
jephthah is offline Offline
2,567 posts
since Feb 2008
Jun 11th, 2009
0

Re: Graphical Dos Interface

Click to Expand / Collapse  Quote originally posted by jephthah ...
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 adding constructive responses to!

Adatapost, you do not have to use a jephthah-approved compiler.
Last edited by WaltP; Jun 11th, 2009 at 9:01 pm.
Moderator
Reputation Points: 3278
Solved Threads: 892
Posting Sage
WaltP is offline Offline
7,718 posts
since May 2006
Jun 11th, 2009
0

Re: Graphical Dos Interface

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.



.
Last edited by jephthah; Jun 11th, 2009 at 9:13 pm.
Reputation Points: 2143
Solved Threads: 178
Posting Maven
jephthah is offline Offline
2,567 posts
since Feb 2008
Jun 12th, 2009
0

Re: Graphical Dos Interface

Click to Expand / Collapse  Quote originally posted by WaltP ...
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
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 )
Reputation Points: 2125
Solved Threads: 243
Postaholic
tux4life is offline Offline
2,105 posts
since Feb 2009
Jun 12th, 2009
2

Re: Graphical Dos Interface

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.
Reputation Points: 1486
Solved Threads: 140
Practically a Posting Shark
siddhant3s is offline Offline
816 posts
since Oct 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Static Objects of class within that class
Next Thread in C++ Forum Timeline: Form gets stuck but not when showing a MessageBox in the end of code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC