Win API

This is a discussion on Win API within the Game Programming forums, part of the General Programming Boards category; Anyone know some good links? I've searched on msn, but found everything (almost) for VB and some other stuff that ...

  1. #1
    In your face... ha ha ha Liger86's Avatar
    Join Date
    Dec 2002
    Location
    Motorcity Capital
    Posts
    321

    Win API

    Anyone know some good links? I've searched on msn, but found everything (almost) for VB and some other stuff that explain things using c not c++ (tutorial wise).

    What I need is a really good tutorial on win32 api, that specifically tells the "story" in c++!

    resources will do fine too!

    thanks~!

  2. #2
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    this should be moved.

    I don't know a whole lot of winapi using C just enough to make a program with buttons and text boxes and menus and stuff, but when you do use winapi it's mostly C style coding anyway, the only C++ in straight winapi is setting up the WNDCLASS or WNDCLASSEX instance. C++ winapi is done with the microsoft foundation classes (MFC< you've probagbly heard of it_) and I personally prefer straight winapi using C style coding. as for actually giving the links that you asked for up coming up short

  3. #3
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    check out FoosYerDoos for some great tutorials.

  4. #4
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Originally posted by Silvercord
    this should be moved.

    I don't know a whole lot of winapi using C just enough to make a program with buttons and text boxes and menus and stuff, but when you do use winapi it's mostly C style coding anyway, the only C++ in straight winapi is setting up the WNDCLASS or WNDCLASSEX instance. C++ winapi is done with the microsoft foundation classes (MFC< you've probagbly heard of it_) and I personally prefer straight winapi using C style coding. as for actually giving the links that you asked for up coming up short
    Working with the Win32 API from a C++ perspective doesn't require you to work with the MFC library... you can use other wrapper libraries, or you could create your own (which I admit is quite fun and rewarding)

    [pointless example]
    Code:
    namespace eib
    {
       class WndClassEx : public WNDCLASS
       {
       public:
       	WndClassEx(HINSTANCE instance = GetModuleHandle(NULL)) {
       	   Defaults(instance);
       	}
       	
       	WndClassEx(LPCSTR name, WNDPROC callback, HINSTANCE instance = GetModuleHandle(NULL))
       	{
       	   Defaults(instance);
       		
       		lpszClassName = name;
       		lpfnWndProc = callback;
       	}
       	
       	~WndClassEx() {};
       	
       	inline ATOM Register() const { return ::RegisterClass(this); }
       	inline void Callback(WNDPROC proc) { lpfnWndProc = proc; }
       	inline void Name(LPCSTR clsname) { lpszClassName = clsname; }
       	
       protected:
       
          inline void Defaults(HINSTANCE instance) 
          {
             memset(this, 0, sizeof(*this));
       		hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
       		hInstance = instance;
       		hIcon = LoadIcon(NULL, IDI_APPLICATION);
       		hCursor = LoadCursor(NULL, IDC_ARROW);
       		style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
          }
             
       };
    }
    [/pointless example]

  5. #5
    Registered User
    Join Date
    Feb 2002
    Posts
    93

    Hmm

    Hmm.. i think when i learned Win API i looked at www.gametutorials.com under the win32 section.. (not positive and too lazy too look) but i think the tutorials are good and progressively get tougher...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help with this
    By tyrantil in forum C Programming
    Replies: 18
    Last Post: 01-30-2005, 03:53 PM
  2. win api literature
    By DMaxJ in forum Windows Programming
    Replies: 5
    Last Post: 04-30-2004, 03:25 PM
  3. Help with editor windows with win api
    By NightStalker in forum Windows Programming
    Replies: 1
    Last Post: 03-13-2003, 02:53 AM
  4. Win API
    By Marky_Mark in forum Windows Programming
    Replies: 4
    Last Post: 10-23-2001, 12:57 PM
  5. Rich edit control example Win API
    By Echidna in forum Windows Programming
    Replies: 1
    Last Post: 09-17-2001, 02:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21