Thread: Learn Win32 before DirectX,opengl, etc?

  1. #1
    0x01
    Join Date
    Sep 2001
    Posts
    88

    Learn Win32 before DirectX,opengl, etc?

    Should I learn Win32 programming before I start learning DirectX or OpenGL?
    Or is basic C++ enough to jump into DirectX or OpengL?

    If not, then what is a good book to get on Win32 programing(I have the Microsoft Visual C++ compiler)?

    Or do you have any other suggestions?

    I don't want to start something and then have to turn around and start all over again because of something I didn't know.

  2. #2
    Registered User EvenFlow's Avatar
    Join Date
    Oct 2001
    Posts
    422
    I would say learn some Win32 first. Programming Windows, the Definitive Guide to the Win32 API by Charles Petzold. To get you started try www.winprog.org and go to the tutorials section. It's pretty basic, but it will get you started.
    Ramble on...

  3. #3
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    I saw this book at the store a day or two ago, 5th edition. It is good?

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    Many people regard Petzold as the book for Win32 programmers. It does, however assume you are using MS compilers, some of the examples do not work if you are using Borland, Dev-C etc.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #5
    Registered User EvenFlow's Avatar
    Join Date
    Oct 2001
    Posts
    422
    It is good Troll_King, but as adrianxw said, it does assume that you are using an MS compiler. DevC++ will do Win32, but sometimes it won't always work without some tweaking of your programs.
    Ramble on...

  6. #6
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    I'll probably buy it next than. It seems that Win32 is a good bet compared to MFC. It's more flexible, or so I hear.

  7. #7
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    Well, OWL and MFC have their places. They don't have the flexibility, but by encapsulating windows as objects, it becomes much easier to work with them.

    And, never are you limited to using ONLY MFC or OWL -- the WinAPI is still perfectly usable, these merely encapsulate common operations.

    Personally, as I still use Borland C++ 5.02 (back when their IDE-based compilers were, for a brief time, free) I use OWL for speed and clarity for many of the windows commands, and I use the WinAPI to get the additional functionality that OWL lacks.

  8. #8
    0x01
    Join Date
    Sep 2001
    Posts
    88
    ok, then, i will go get the petzold book for win32 programmers, and i will also take the tutorials at winprog, thanks evenflow, seriously.

  9. #9
    .
    Join Date
    Aug 2001
    Posts
    598
    >DevC++ will do Win32, but sometimes it won't always work without some tweaking of your programs.<

    A while ago on the old board Sunlight pointed out that the libaries used by dev were outdated this might be part of the problem.
    To Err Is To Be Human. To Game Is Divine!"

  10. #10
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    Well, OWL and MFC have their places. They don't have the flexibility, but by encapsulating windows as objects, it becomes much easier to work with them.
    You've got a point here too. This is true.

  11. #11
    Registered User EvenFlow's Avatar
    Join Date
    Oct 2001
    Posts
    422
    >>ok, then, i will go get the petzold book for win32 programmers, and i will also take the tutorials at winprog, thanks evenflow, seriously.

    Don't metion it . Good luck with it all. But don't get too worried if at first things seem confusing. It takes a while to shift from doing proceedural programming to event driven.

    >>A while ago on the old board Sunlight pointed out that the libaries used by dev were outdated this might be part of the problem.

    Yes that's what the problem is. It (DevC++) isn't 100% ISO C compliant. However, if you were really serious about Windows programming (as in you want to really get into it or you were a professional), you would use either MSVC++ 6.0, the .NET beta, or Borland. Don't get me wrong, I like it, but it isn't the best.
    Ramble on...

  12. #12
    Registered User EvenFlow's Avatar
    Join Date
    Oct 2001
    Posts
    422
    >>Don't metion it

    Doh! That should be . (Probably just thinking about the 4 exams I've got in a weeks time )
    Ramble on...

  13. #13
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    Okay I bought this book today, C Petzold, Programming Windows Fifth Edition. I can now tinker with Win32. I can indeed see C code, which is good because I understand it. This book is kind of old, it says revised in 1999. Mentions win NT 5.0. Well, my question is, has Win32 changed at all since 1999?

    Should I know my OS first really well? Win2k. I have seen a few books about programming for Win2k, such as the Win2k bible. Is this Win32? I think it is. How much would be Win2k specific.
    Last edited by Troll_King; 10-17-2001 at 04:28 PM.

  14. #14
    0x01
    Join Date
    Sep 2001
    Posts
    88
    >Don't metion it. Good luck with it all. But don't get too worried if at first things seem confusing. It takes a while to shift from doing proceedural programming to event driven.
    Yeah, Just to make a simple window is confusing, well, to me it is. Thanks for the tip.

  15. #15
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    Win32 is anything from Windows 95 on.

    Most things work on any Win32 OS, but a few won't:

    * DirectX 8 won't work on windows 95, mostly because of planned obsolescence -- MS's attempt to force 95 users to upgrade.
    * NT forbids certain things, or requires that you have a high enough security.

    Generally, anything "NT only" means NT4 & windows 2000. Although Xp is an NT core machine, they stripped all the security out, and they made some more changes to it.

    But, in reality:

    Win95 and win98 are practically identical, same with WinME. NT4 and Win2K are almost the same as each other, and close to Win95/98 -- they differ in security, primarily. WinXP is very much the same as 95/98/Me, too.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Do you ever try to learn too much?
    By Stonehambey in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 06-17-2008, 07:55 AM
  2. Looking to learn C++
    By Fuzzy91 in forum C++ Programming
    Replies: 40
    Last Post: 04-13-2006, 02:38 AM
  3. confusion win32 -console app
    By GanglyLamb in forum C Programming
    Replies: 2
    Last Post: 06-11-2003, 10:12 AM
  4. Witch to learn first?
    By Unregistered in forum Windows Programming
    Replies: 2
    Last Post: 06-17-2002, 12:06 AM
  5. Learn Win32 API or C++Builder?
    By Flucas in forum Windows Programming
    Replies: 1
    Last Post: 10-18-2001, 01:49 AM