windows.h????

This is a discussion on windows.h???? within the Game Programming forums, part of the General Programming Boards category; Hey just started messing around with some book on game programming and the first thing it shows me is some ...

  1. #1
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101

    Exclamation windows.h????

    Hey just started messing around with some book on game programming and the first thing it shows me is some simple hello world thing. I've never windows programmed before so I'm clueless. Just C programming. Here's the code:
    Code:
    //Beginning Game Programming, 2nd Edition
    //Chapter 2
    //HelloWorld program
    #include <windows.h>
    
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    				   LPSTR lpCmdLine, int nShowCmd)
    {
    	MessageBox(NULL, "Motoko Kusanagi has hacked your system!",
    		"Public Security Section 9", MB_OK | MB_ICONEXCLAMATION);
    }
    I'm using C++ Express Edition and it says it can't find that library...for windows.h In addtion I can't find a Win32 Project selection on the New Project menu..so I don't know if that's the problem or what.

  2. #2
    Registered User
    Join Date
    Jan 2006
    Location
    Sweden
    Posts
    92
    You need to install the platform SDK, a guide on how to do it can be found here:
    http://msdn.microsoft.com/vstudio/ex...alc/usingpsdk/

    Good luck

    Wazaa

  3. #3
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101

    Exclamation

    I already have that...but I reinstalled my Visual Studio 2003 and I think the problem was that I was working from a Win32 console app rather than a Windows application...and I didn't feel like messing around with Express too long so I just worked it out on that. If anyone has any clue as to how to get to a Windows app on 2005 Express I'd love to know so I don't have two libraries going at once between my beg. gaming stuff and all my C/C++ programs I've written.

  4. #4
    Registered User
    Join Date
    Jan 2006
    Location
    Sweden
    Posts
    92
    Check the link I posted, it tells you how to configure VS 2005 Express with the platform SDK and how to enabling the windows applications. I also think you need to configure the directories, I don't think it matters which type of project you do - it would find the windows.h if you got the correct configuration.

  5. #5
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    Your're right (and you probably knew that). I have to download all that SDK...there's like 20 cab.'s or something like that. I mess with that then see do the other stuff you said and then see if it works. Thanks....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems reading windows.h
    By yaya in forum Windows Programming
    Replies: 7
    Last Post: 05-22-2009, 02:33 PM
  2. windows.h no such file or directory
    By FingerPrint in forum Tech Board
    Replies: 11
    Last Post: 08-26-2006, 09:51 PM
  3. Windows.h help
    By Mustang5670 in forum C Programming
    Replies: 3
    Last Post: 01-02-2004, 10:59 AM
  4. UNICODE and windows.h help
    By nextus in forum Windows Programming
    Replies: 3
    Last Post: 03-02-2003, 02:13 PM
  5. windows.h without the mouse support
    By ()Q() in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2002, 07:57 PM

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