Go Back   All Net Tools - Forum > Main > Programming
Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 03-16-2007, 06:06 PM
Moonbat's Avatar
Moonbat Moonbat is offline
Moderator
 
Join Date: Sep 2006
Location: Eat
Posts: 1,660
Send a message via MSN to Moonbat
C++ Win32 API tutorial?

I've Googled for C++ WinAPI tutorials, but the ones I get use C coding. I need one that's organized and uses C++ code. If anyone can help me, I'd appreciate it.
Reply With Quote
  #2  
Old 03-16-2007, 06:31 PM
Ezekiel's Avatar
Ezekiel Ezekiel is offline
Moderator
 
Join Date: Sep 2005
Location: UK
Posts: 2,071
Quote:
Originally Posted by Moonbat View Post
I've Googled for C++ WinAPI tutorials, but the ones I get use C coding. I need one that's organized and uses C++ code. If anyone can help me, I'd appreciate it.
The Windows API functions are mostly the same regardless of the language you're using; C, C++, VB -- they all have the same function names and the same parameters.

C is not very different from C++ in most ways, and most C code will compile as C++. I've found that most API tutorials are written with C in mind, but that's fine because the usage of the Windows functions is what we're looking for, and the context does not really matter. You can see how things are done then implement it in your own code, re-written according to C++ rules.

The WinAPI isn't something that is covered in one tutorial. There are many different parts of it that are covered separately.

First, you should have a reasonable knowledge of your chosen language. I see that's C++. In this case, as an example you should know instantly what these words mean:
  • Variable
  • Function
  • Preprocessor
  • Pointer
  • Reference
  • Parameter
  • Argument

Next, you should ask yourself what you want to do with the language. Do you want to display windows instead of boring console applications? I'd say write at least a couple of decent console applications in Windows first to get used to programming. Windows GUI programming is relatively easy when you know how, but at first you look at it and, frustrated, you curse how needlessly complicated it is. People new to programming always want to know how to display a window, but it's not that important.

Anyway, getting back to the point, these two resources will prove to be invaluable when programming with the API:

http://msdn.microsoft.com/library
ftp://ftp.cs.virginia.edu/pub/lcc-win32/win32hlp.exe

The second is a help file for the API, although I got mine elsewhere.

For making windows, search Google for windows api GUI tutorial or something like that. There are many, most for C.

For network programming, search for "Johnnie winsock" and you'll find the tutorial he keeps moving around.
Reply With Quote
  #3  
Old 03-16-2007, 07:36 PM
Moonbat's Avatar
Moonbat Moonbat is offline
Moderator
 
Join Date: Sep 2006
Location: Eat
Posts: 1,660
Send a message via MSN to Moonbat
Thanks for those two links mike. I know that C can be compiled on C++ compilers, but I was thinking that C++ WinAPI was really different from C WinAPI, but according to you, it's not.

But I've got a question. By "decent console applications in Windows" do you mean just normal DOS-window C++ programs?
Reply With Quote
  #4  
Old 03-16-2007, 07:51 PM
Ezekiel's Avatar
Ezekiel Ezekiel is offline
Moderator
 
Join Date: Sep 2005
Location: UK
Posts: 2,071
Quote:
Originally Posted by Moonbat View Post
Thanks for those two links mike. I know that C can be compiled on C++ compilers, but I was thinking that C++ WinAPI was really different from C WinAPI, but according to you, it's not.
They're pretty much the same, yes.

Quote:
But I've got a question. By "decent console applications in Windows" do you mean just normal DOS-window C++ programs?
Yeah, just learn how to program independently of any GUI concepts so you don't rely on Windows' provisions later. This way you learn that programs should be about accomplishing something, not about creating fancy-but-pointless menus and such.

I've got that feeling again... The feeling that this forum is dead and we're the only two posting.
Reply With Quote
  #5  
Old 03-16-2007, 07:56 PM
Moonbat's Avatar
Moonbat Moonbat is offline
Moderator
 
Join Date: Sep 2006
Location: Eat
Posts: 1,660
Send a message via MSN to Moonbat
Hmm.. yeah, it seems so. But fear not, the spambots will kill that feeling before you can say 'Mass Deletion.'

Well anyway, thanks for the help mike.
Reply With Quote
  #6  
Old 03-22-2007, 07:16 PM
tocksarcle tocksarcle is offline
Registered User
 
Join Date: Sep 2006
Location: 5cdd21c97f86686cc505e02fd32a7523
Posts: 32
http://www.relisoft.com/win32

This one teaches the windows API using C++, not just plain ol' C (doesn't really make much of a difference though)
Reply With Quote
  #7  
Old 03-22-2007, 07:57 PM
Ezekiel's Avatar
Ezekiel Ezekiel is offline
Moderator
 
Join Date: Sep 2005
Location: UK
Posts: 2,071
Quote:
Originally Posted by tocksarcle View Post
http://www.relisoft.com/win32

This one teaches the windows API using C++, not just plain ol' C (doesn't really make much of a difference though)
When I was learning about Windows programming I seem to remember that tutorial made things needlessly difficult, telling you to make your own classes to encapsulate tasks instead of keeping it basic. Reading it now, I can see that it's actually better from the material I learned from.
Reply With Quote
  #8  
Old 04-14-2007, 07:01 AM
Tito Tito is offline
Registered User
 
Join Date: Apr 2007
Posts: 30
Heres some C++ eBooks you might find useful.

http://rapidshare.com/files/17664284/Addison_Wesley_-_Advanced_CORBA_Programming_with_C__.chm.html"

Or http://www.MegaShare.com/116242
_____________________________________________________________
http://rapidshare.com/files/17663691/addison_wesley_-_essential_c__.chm"
or http://www.MegaShare.com/116243
_______________________________________________________________
C++ Style_4New_Engineering_Puzzles http://www.MegaShare.com/116245
_____________________________________________________________
http://rapidshare.com/files/17663723/Addison_Wesley_-_Exceptional_C__.chm.html"
--------------------------------------------------------------------
http://rapidshare.com/files/17663759/Addison_Wesley_-_Imperfect_C___Practical_Solutions_for_Real-Life_Programming.chm.html"
------------------------------------------------------------------------
http://rapidshare.com/files/17663771/Addison_Wesley_-_Inside_the_C___Object_Model.chm.html"
------------------------------------------------------------------------
http://rapidshare.com/files/17664110/Addison_Wesley__-_Parallel-and-Distributed-Programming-Using-C__.chm.html"
--------------------------------------------------------------------------
http://rapidshare.com/files/17664335...tware.chm.html
-----------------------------------------------------------------------
http://rapidshare.com/files/17664354...lines.chm.html
------------------------------------------------------------------------
http://rapidshare.com/files/17664361...ming_.chm.html
------------------------------------------------------------------------
http://rapidshare.com/files/17664417...ol__1.chm.html
------------------------------------------------------------------------
http://rapidshare.com/files/17664539...rence.chm.html
----------------------------------------------------------------------
http://rapidshare.com/files/17664558...Beyond.ch.html
---------------------------------------------------------------------
http://rapidshare.com/files/5359341/cgc.rar Creating games in c++

copy & paste some of them. Rapid Share downloads are all different ebooks
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.