hey every1,
can any one tell me how to draw a ball or a circle in an console application vc++ and make it move around various coordinates..

basically the ball shud move arnd 4 directions.

i tried printin chars but dont quite know how to go about paintin the ball on screen

i shall be grateful!!


thanks!

Although it's not for VC++ you can look through the code of cyber_azis and find some answers. There is a Borland library adapted for Dev-Cpp (another C++ compiler) that gives you the opportunity to create console graphics. There is a topic on this and more detailed explonation in the code snippets section of this site. Good luck.

i understand what u say,.,. but i cannot use any of BGI header files in VC++ moreover i dont want to use..

so can u please let me know as to how do i go about painting a ball on the screen?


atleast drawin a circle wud be of great help.. hopefully i can do the animation later myself.


thanks

I've posted something like this before 2 years ago.

The downloads appear to be still there.

thanks dante..

but i was wondering as to how can i have a text in between the ball program that u have created..

i would want to put letters like U,D,L,R in between the circle when they move up down left and right respectively..

can u please help me with this?

the ball program is here

http://www.daniweb.com/techtalkforums/showthread.php?p=2677#post2677

thanks!

Probably the easiest way to accomplish it is to use a set of bitmaps. One each for U, L, R and D. Then draw the bitmaps instead of the ball.

I could take the time and do it for you, but I don't think you'll actually understand the code. If you've just started to learn Windows programming, I suggest taking the time to understand things slowly before jumping into everything.

Here's a list of Windows programming tutorials.

Probably the easiest way to accomplish it is to use a set of bitmaps. One each for U, L, R and D. Then draw the bitmaps instead of the ball.

I could take the time and do it for you,
Here's a list of Windows programming tutorials.

hey dante..

thanks so much!!

this might sound strange but i seem to understand things better when i see the code...

could you please take some time off and give me a sample of how to do the same.

i had be grateful!

thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.