Tech Support Guy banner
  • Please post in our Community Feedback thread for help with the new forum software! If you are having trouble logging in, please Contact Us for assistance.
Status
Not open for further replies.
1 - 5 of 5 Posts

·
Registered
Joined
·
110 Posts
Discussion Starter · #1 ·
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.
 

·
Registered
Joined
·
1,741 Posts
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
 

·
Registered
Joined
·
110 Posts
Discussion Starter · #3 ·
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
 

·
Registered
Joined
·
1,741 Posts
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
 

·
Registered
Joined
·
110 Posts
Discussion Starter · #5 ·
Thank you for explaining that.
 
1 - 5 of 5 Posts
Status
Not open for further replies.
Top