C++ help

Status
This thread has been Locked and is not open to further replies. The original thread starter may use the Report button to request it be reopened but anyone else with a similar issue should start a New Thread. Watch our Welcome Guide to learn how to use this site.

motocross95

Thread Starter
Joined
Oct 30, 2001
Messages
110
I am using Visual C++ that comes with Visual Studio 6. I wanted to be able to initialize the graphics so I could draw lines, and circles and what not. Can someone help me with this? Basically once I get enough info I want to try to make a little game of PONG. Just something to test myself. Thank you everyone.
 
Joined
Mar 18, 2001
Messages
1,741
I have no experience with VC++, so I have no
idea how it's native graphic routines (if there are
any) would work.

However, if you're working in a Windows app
(not a DOS box), you can use these Windows API
commands to do simple drawing:

MoveToEx (start point of a line)
LineTo (end point of a line)

Ellipse (draw circle or oval)

Rectangle (draw square/rectangle)
RoundRect (draw square/rectangle with round corners)

ExtFloodFill (fill an area with color)

It's somewhat involved. You must get the DC
(device context) to draw on and release it
when you're done, select pens and brushes
(as well as saving the current ones so you can
restore them).

If VC++ has it's own graphic routines, it's probably
easier to use them. But if you want to use the API,
I'll try to help.

Cheers, Mac
 

motocross95

Thread Starter
Joined
Oct 30, 2001
Messages
110
Thank you for responding, even though I don't know what you mean when you say API. I'm sorry, I'm an idiot. Maybe there is a library out there I can include that has basic graphical functions. If anyone knows of one, let me know please. Thanks
 
Joined
Mar 18, 2001
Messages
1,741
The Windows API (Application Programming Interface)
is a set of commands built into the Windows operating
system that can be called from most programming
languages.

Cheers, Mac
 
Status
This thread has been Locked and is not open to further replies. The original thread starter may use the Report button to request it be reopened but anyone else with a similar issue should start a New Thread. Watch our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top