GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 06-Jan-2005, 01:28
kumaran kumaran is offline
Junior Member
 
Join Date: Dec 2004
Posts: 31
kumaran is on a distinguished road

printing nos in vc++


hi plz tell me how to print number in OnDraw.
I tried pDC->TextOut(10,10,"%d",d);
but it is not working.
and also plz tell me how to use that number for drawing a grid.
  #2  
Old 07-Jan-2005, 06:53
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough
Convert int to string and then display that string
Quote:
Originally Posted by kumaran
and also plz tell me how to use that number for drawing a grid.
Explain what you want to do
  #3  
Old 09-Jan-2005, 22:51
kumaran kumaran is offline
Junior Member
 
Join Date: Dec 2004
Posts: 31
kumaran is on a distinguished road

printing numbers


mine is a doubt in the basics in mfc.i want to print numbers by writing the code in 'OnDraw' function. i'am able to print characters or string using TextOut.
but i donno how to print numbers.
  #4  
Old 10-Jan-2005, 00:28
LuciWiz's Avatar
LuciWiz LuciWiz is offline
Moderator
 
Join Date: Jul 2004
Location: Cluj-Napoca (Romania)
Posts: 961
LuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the rough
Quote:
Originally Posted by kumaran
mine is a doubt in the basics in mfc.i want to print numbers by writing the code in 'OnDraw' function. i'am able to print characters or string using TextOut.
but i donno how to print numbers.

Quote:
Originally Posted by aie0
Convert int to string and then display that string

That is how to print numbers! Convert them to strings and use TextOut on that.
We already covered converting int to string in MFC. Please follow the link and try it out.

Best regards,
Luci
__________________
Please read these Guidelines before posting on the forum

"A person who never made a mistake never tried anything new."
Einstein
 
 

Recent GIDBlogWriting a book by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing problem Frandy MS Visual C++ / MFC Forum 1 16-Feb-2005 14:47
printing integers in graphics mode enggwaqas C Programming Language 4 04-Oct-2004 21:47
I cant believe this doesnt work: - basic printing of integers to screen davo C Programming Language 2 24-Jul-2004 22:50
Printing nniehoff Computer Software Forum - Windows 0 06-Feb-2002 08:07

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 03:54.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.