Using cout with graphic screens

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2006
Posts: 224
Reputation: bugmenot is an unknown quantity at this point 
Solved Threads: 31
bugmenot bugmenot is offline Offline
Posting Whiz in Training

Using cout with graphic screens

 
0
  #1
Nov 6th, 2008
If I initialize graphics in my program and then use cout the font appears bigger than normal and the cursor doesn't blink on the screen as it does when the graphics are not initialized.Is there any way I can use graphics as well as cout in my program?If yes how to do that.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 671
Reputation: Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough 
Solved Threads: 113
Freaky_Chris's Avatar
Freaky_Chris Freaky_Chris is online now Online
Practically a Master Poster

Re: Using cout with graphic screens

 
0
  #2
Nov 6th, 2008
Just a though but you may need to be a little be more specific when you say graphics... also i would suggest pasting some sample code, that demonstrates the problem

Chris
Knowledge is power -- But experience is everything
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 390
Reputation: skatamatic will become famous soon enough skatamatic will become famous soon enough 
Solved Threads: 39
skatamatic skatamatic is offline Offline
Posting Whiz

Re: Using cout with graphic screens

 
0
  #3
Nov 6th, 2008
Originally Posted by bugmenot View Post
If I initialize graphics in my program and then use cout the font appears bigger than normal and the cursor doesn't blink on the screen as it does when the graphics are not initialized.Is there any way I can use graphics as well as cout in my program?If yes how to do that.
Which graphics library are you using? I wouldn't think cout would work with any windows graphics lib, since it's for streaming to the console. But apperantly I'm wrong?
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 38
Reputation: asifjavaid is an unknown quantity at this point 
Solved Threads: 0
asifjavaid asifjavaid is offline Offline
Light Poster

Re: Using cout with graphic screens

 
0
  #4
Nov 7th, 2008
Originally Posted by bugmenot View Post
If I initialize graphics in my program and then use cout the font appears bigger than normal and the cursor doesn't blink on the screen as it does when the graphics are not initialized.Is there any way I can use graphics as well as cout in my program?If yes how to do that.
Hi,

There are two modes of programming in Borland C++.

1. text mode
2. graphics mode.

In text mode, we have 80 columns and 50 rows in windows xp but in graphics mode, we have 640 columns and 480 rows.
Every mode has its own define functions. We cannot use text mode function and graphics mode similarly, its opposite is too.

"cout " works only in text mode. It cannot be used in graphics mode instead you have to use graphics function to print some text in graphics mode.

try this function in graphics mode. outtextxy(x,y,"string to write");

  1.  
  2. int x = 300;
  3. int y=200;
  4. outtextxy(x,y,"Hello World");
  5.  
  6. //output:- The text will be printed approximately in the center of the graphic mode screen


--
Regards,
Asif
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC