Thread: Beginer looking for an intro to graphics in C++...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    10

    Talking Beginer looking for an intro to graphics in C++...

    I'm a second year computer science student looking for an introduction to grahpics in Visual C++ 6.0 . The cirriculum at my school doesn't include any graphics, and my teacher hasn't programed a computer in at least 10 years, so I got little help there. I had figured out some neat things on the computers at my school from the help files using GRAPHICS.H, but our computers are really old, so none of the files I use there are on my home computer (and those that I do try to bring home contain things like _far which Visual Studio doesn't like). Every source for graphics information I've found either contains files that I don't have or comes from windows-based books that only tell me how to plug in words in certain places to get pre-made stuff to work. It looks pretty, but I'm pretty useless outside of these isolated examples. Can anyone tell me where I can get a good basic understanding of graphics with the files included in the Visual Studio 6.0 that I can then expand on so that maybe one day I will understand all the stuff in those big books? Any information or suggestions would be greatly appreciated, and yes, I know I'm just a dumb kid, so you don't have to tell me that.

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    10

    One more detail...

    I DID look in the tutorials on this site before I posted this (I'm not THAT annoying) and I tried using them, but my compiler didn't recognize the _AX or the getinterupt() in the example. What file do I need to include to get those to work?

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    7

    Dude, i know how you feel

    I have the same problem with my compiler. Even though i am using VC++ 6.0, i can't recognize those commands. I also tried asking for help on this site, but people aren't very ready to. Don't bother about graphics here, the people who could answer your question either don't bother, or waste time telling you to go somewhere else. I am still looking for a good graffics tutorial for VC++ 6.0. If i find one, i will tell you.

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    10

    it seems this should be taught at school...

    I'm supposedly in a "college level" computer science class (Advanced Placement), and yet they never teach anything about graphics...you only learn how to use pre-created classes. Doesn't seem very helpful to me...am I going to be at a disadvantage if I take actual programing classes in college? Will they expect me to know this stuff already, or will they teach it to me?
    P.S. My Towers of Hanoi program has the best-looking graphics ever created with GRAPHICS.H!!!...well, at least out of all the people in my class... =)

  5. #5
    Registered User Azuth's Avatar
    Join Date
    Feb 2002
    Posts
    236
    Graphics really depends on what you want to do. There are many many ways of implementing graphics in your programs depending on what you want to do. It is difficult to answer when one does not understand the question. If someone came along and said "Help me with aircraft electronics", what would the answer be, this is how you fix a pulse dopler radar? or This is how you fix the flight control computer on a 767. Which of these answers would help the person asking the question, either, both, neither?

    So....
    for your graphics, are you thinking about loading photo's next to a name in an employee database? Or are you thinking of graphically displaying frequencies from sound files? Do you se my point?

    If you're thinking about programming something that looks flashy and might lead you to 2d or 3d graphics in games. Search the web for development or tutorials in, OpenGL, Allegro or DirectX.

    For OpenGl, have a look at the following site.
    http://nehe.gamedev/net/

    And before you go around knocking this board.
    Search the board, and use some common sense, if it's games you want, post in the games forum. If you have a specific question, ask it. Better yet, grab that search function now, search for posts by Prelude, and go to the link in the signature about how to ask questions.
    Demonographic rhinology is not the only possible outcome, but why take the chance

  6. #6
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    If you want to do Graphics in the Win32 API, I suggest Petzold's book. It's not really specialized towards graphics, but it enabled me to learn enough to make a space invaders game.

    If you want to buy the book, it's around $65... or you could get the eBook off of my FTP. The link is in my signature.

  7. #7
    Registered User
    Join Date
    May 2002
    Posts
    10

    Talking Thanks for the recommendation

    I started looking at the book that you recommended. It's interesting, and I can understand most of it, but I've found that I have trouble applying that stuff outside of the context of the book. Since I've never done any Windows programming before, I don't how to do many of the things I could in text-based programing. For example, the compiler didn't like it when I tried to create a class in the regular old way I've been doing since I started working with C++. Do you (or anyone else) know a good basic place to start for Windows-based programing? My main issue is bridging the gap between text-based programming and the seemingly-overwhelming world of all the Windows stuff. Thanks again for the book reference.

  8. #8
    Registered User
    Join Date
    Aug 2001
    Posts
    403

    hey where in cary?

    Hey do you go to CHS?

    (this is James, in case you know me)

    I'll get to you on some links for graphics real quick.

  9. #9
    Registered User
    Join Date
    May 2002
    Posts
    10

    I go to Enloe

    Hey, I live in Cary, but I go to school at Enloe High School in Raleigh. If I went to my base school, I'd be at CHS though.

  10. #10
    Registered User
    Join Date
    Aug 2001
    Posts
    403

    API choices

    DirectX, SDL, Allegro, Mode X (old dos asm graphics), OpenGL, and a few others are all for Graphics.. I'd recommend learning something real simple (like SDL) first. SDL doesn't require you know any sort of other API (like DirectX needs you to know Windows API) and later you can dive into OpenGL. This is of course if you're interested in game type programming, for just applications Windows API is the most popular choice (technically SDL can do this too, but it's mainly used for game type applications).


    www.libsdl.org (email [email protected] or IM cecildasquid for help setting it up and finding good learning tutorials)

  11. #11
    Registered User
    Join Date
    May 2002
    Posts
    10

    I'm not really looking for game graphics

    I don't really program games, so I don't really need those kind of graphics (at least not yet). What I'm looking to do is improve the user-interface of all my old text-based programs. I want to be able to gain some Windows functionality (maybe message boxes, menus, the "File Open" dialoge, etc. like what I found in the book by Petzold recommended by Dual-Catfish), which is why I was interested in an introduction to Windows, but I also don't want my programs to look like they were made in Visual Basic with me just putting in the appropriate words on the menus and message boxes. Should I first learn how to make generic-looking Windows-based programs, or are the more interesting user-interfaces created in a totally different way?
    P.S. At this point, I'm not expecting to be able to create incredible interfaces. I'm pretty much at square one when it comes to Windows (my old programs don't work at all when I try to bring them over to Windows), so I'm definitely not looking for anything advanced yet. Thanks!

  12. #12
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    do u use msvc++?

    i thought GRAPHICS.H was borland only

    how do u want your graphics to look like?

  13. #13
    Registered User Mario's Avatar
    Join Date
    May 2002
    Posts
    317
    Well, I sincerely hope graphics.h is not borland only.
    In fact I hope it's anything but Borland. Simply because the $600 I payed for C++ Builder I got last week don't come with any graphics.h.

    So tell me... Is it time to go back and ask for a refund? I'm good at that.
    Regards,
    Mario Figueiredo
    Using Borland C++ Builder 5

    Read the Tao of Programming
    This advise was brought to you by the Comitee for a Service Packless World

  14. #14
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    it doesn't?
    are u sure
    i could give it to u!?
    give me yor email adress and i'll post it to u

  15. #15
    Registered User
    Join Date
    May 2002
    Posts
    10

    How old is your version of graphics.h?

    Do you have a more updated version of graphics.h that doesn't include the _far keyword? If so, could I get it from you? Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Turtle Graphics, how does it work?
    By freddyvorhees in forum C++ Programming
    Replies: 15
    Last Post: 08-28-2009, 09:57 AM
  2. Beginning Game Programming Type Books
    By bumfluff in forum Game Programming
    Replies: 36
    Last Post: 09-13-2006, 04:15 PM
  3. Graphics Programming :: Approach and Books
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 05-11-2004, 08:33 PM
  4. egavga.bgi problem
    By sunil21 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-22-2003, 05:06 PM
  5. Graphics Devices and Cprintf clash
    By etnies in forum C Programming
    Replies: 6
    Last Post: 05-09-2002, 11:14 AM