Thread: GDI using microsoft visual studio

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    144

    GDI using microsoft visual studio

    Can anyone recommend any good websites or videos to learn GDI?

  2. #2
    Registered User
    Join Date
    Sep 2010
    Posts
    69
    I don't know any specific websites.
    I too am just learning GDI.

    I recommend you "search" the archives at this site for "GDI".
    Also, Charles Petzold's book: Programming Windows 5th Ed., available on Amazon.
    I recently picked up, (for cheap) on Amazon: Windows Graphics Programming, by: Sanchez and Canton.

  3. #3
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    639
    The usual solution to tutorials for Windows is theForger's Win32 API Tutorial. Considering they have GDI pages, I think that's another fine job done by theForger.

  4. #4
    Registered User
    Join Date
    Mar 2011
    Posts
    53
    Try these:

    The GDI
    (this one is easier to start)

    Win32 Programming - FunctionX
    (this one is more detailed)

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Why do you need to learn GDI?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Registered User
    Join Date
    Mar 2011
    Posts
    3
    * Legacy support
    * Smaller files
    * Less overhead and bloatation
    * No need to force user(s) to install various runtime/driver-packs in order for application to run

    etc

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by GurkaN View Post
    * Legacy support
    As in what, the 1% that uses versions prior to XP? Also, you realize that many libraries support legacy operating systems, as well?

    * Smaller files
    Besides Ace's point, what is a MB or two these days? Seriously? The overhead is negligible at best.

    * No need to force user(s) to install various runtime/driver-packs in order for application to run
    This one is rich. Oh, so you think your Visual C++ programs will run without runtime? Of course they won't. Why don't you go back to the roots and do pure Win32 so you don't have to use any external libraries?
    Point is, this is typically what installers take care of. Otherwise, you can just link them statically and the worry is out the window. Not a very convincing argument.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    As in what, the 1% that uses versions prior to XP? Also, you realize that many libraries support legacy operating systems, as well?
    Point taken...

    Besides Ace's point, what is a MB or two these days? Seriously? The overhead is negligible at best.
    When you're writing a program that comes in at 100K without the bloat... an MB is a big deal.

    This one is rich. Oh, so you think your Visual C++ programs will run without runtime? Of course they won't. Why don't you go back to the roots and do pure Win32 so you don't have to use any external libraries?
    Point is, this is typically what installers take care of. Otherwise, you can just link them statically and the worry is out the window. Not a very convincing argument.
    Actually it is a very convincing argument.

    I'm thinking you don't have a lot of service contact with end users to realize the problem of reliance upon 3rd party libraries can cause people. I've seen entire companies have to shut down their networks for a day to install a new version of their software... and the 30 updates it forces and for some that's quite a hit.

    I currently support a number of home theatre systems in my area. To a one, I got called "What does 'Please install latest version of Direct X' mean?" when the latest version of Media Player Classic Home Cinema came out. I ended up going out, at no charge, and updating all their systems for them.

    So yes, it does matter.

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by CommonTater View Post
    When you're writing a program that comes in at 100K without the bloat... an MB is a big deal.
    You fail to see the point. 1 MB is nothing. Whether your executable is 100 KB or not. It is acceptable.

    Actually it is a very convincing argument.
    A fair point. However, this is a 3rd party library problem.
    However, it is also entirely possible to write libraries which do not force you to shut down all your applications to install or update. Mostly update.
    And it's likely not going to matter when you install Qt, or some other small GUI library.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    You fail to see the point. 1 MB is nothing. Whether your executable is 100 KB or not. It is acceptable.
    Actually, that IS the point... It's about the attitude.

    Only a few years ago, when I was still working Pascal, we used to work to reduce code sometimes only by a few bytes. We cared how much of a customer's machine we occupied and smaller/faster was always better.

    Now it seems the attitude has done a 180. Nobody cares if they are loading up 200megs to play a midi file (exaggeration to make a point). Customer machines are treated as infinite resources and programmers seem not to care that sometimes their code can force whole-cloth hardware upgrades on a company wide basis.

    One or two MB may not be disastrous... but I've seen applications over 30mb that I can program in like 150K... It's a horrible lot of bloat that fails to consider what other applications a customer may be running concurrently. Think of the impact if everything is similarly bloated. More than once, when still on my career, we had to actually sell memory upgrades along with new software... and the customers were not amused.

    A fair point. However, this is a 3rd party library problem.
    However, it is also entirely possible to write libraries which do not force you to shut down all your applications to install or update. Mostly update.
    And it's likely not going to matter when you install Qt, or some other small GUI library.
    No it's a programmer problem... Again, it's the attitude of not caring what you inflict upon your customers. I will agree that sometimes it's necessary to get a certain job done but the amount of raw bloat in software these days is seldom justified on any basis except "ease of programming"which in my opinion runs counter to the craft. We're supposed to be the smart ones that make life easy for end users, not the other way around.

  11. #11
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Less overhead and bloatation
    Eh? I would say GDI is far more overhead than needed and extremely bloated.

    I'm also not convinced about the smaller files bit since most resources in GDI apps are embedded in the executable thus making it extremely large.

  12. #12
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Oh, so you must know everything before you can use it? How about your computer? Do you know everything, down to the atoms and the electrons on how it works? Does it matter?

    "Mom, look! I made my own refrigerator! It's super cool! And it only draws 1000A!"
    "Dear, we already have a refrigerator made by an expert company that draws 1 mA."
    Last edited by Elysia; 03-14-2011 at 10:40 AM.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #13
    Registered User
    Join Date
    Sep 2010
    Posts
    69
    Quote Originally Posted by Elysia View Post
    Oh, so you must know everything before you can use it? How about your computer? Do you know everything, down to the atoms and the electrons on how it works? Does it matter?
    Actually, yes, I do... and yes, it does.
    My first computer, (so to speak, if it could even be called that), was something I constructed, by soldering together transistors, resistors and capacitors.
    Do you even know what those are ?

    I'm guessing, probably not.

    ...you probably think a computer is something you buy at the store.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Interesting.
    So do you know how your stove works? Your refrigerator? Your TV? Do you know how your clothes are made? Do you know how the ingredients for your food are made? Do you know how your house is built?
    If you don't, you can't use them, because that would violate your statement. And if don't know how your house is built, you mustn't live in there, because what if it breaks? How can you fix it?

    Yes, I know what transistors, resistors and capacitors are.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Registered User
    Join Date
    Sep 2010
    Posts
    69

    Unhappy

    Quote Originally Posted by Elysia View Post
    Interesting.
    So do you know how your stove works? Your refrigerator? Your TV? Do you know how your clothes are made? Do you know how the ingredients for your food are made? Do you know how your house is built?
    If you don't, you can't use them, because that would violate your statement. And if don't know how your house is built, you mustn't live in there, because what if it breaks? How can you fix it?

    Yes, I know what transistors, resistors and capacitors are.
    Hmm...,
    ...yes,
    ...basically,
    ...definitly,
    ...most certainly,
    ...yes, I often kill what I eat,
    ...yes I do.

    If you don't, you can't use them, because that would violate your statement. And if don't know how your house is built, you mustn't live in there, because what if it breaks? How can you fix it?
    I don't understand..., at what point did I say or even indicate that I couldn't possibly use an add-on simply because I didn't know or understand how it worked ?
    Just because I like to know how things work, I deserve to be slammed by you.

    I've read a number of your posts on this forum. They often follow along a similar vein.
    It's clear that you were severly abused as a child.

    It's becoming widely know that the abused often become abusers themselves.
    I'm sorry for your sadness in life.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting the matrix question..
    By transgalactic2 in forum C Programming
    Replies: 47
    Last Post: 12-22-2008, 03:17 PM
  2. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 12:17 AM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Apps that act "differently" in XP SP2
    By Stan100 in forum Tech Board
    Replies: 6
    Last Post: 08-16-2004, 10:38 PM
  5. header file bringing errors?
    By bluehead in forum Windows Programming
    Replies: 4
    Last Post: 08-19-2003, 12:51 PM