   ARGH *hits the keyboard with his head*
  ARGH, I'm starting to program Win32 applications and I've been working on a simple program which lets you move a word on the window (and wont let you go off the window).When I RAN it in my compilator it worked fine, but when I ran the EXE file - it didn't work at all, nothing happened!So I spent a WHOLE day testing and trying to figure out what's wrong, I tried shortening the code and finally made it simply display a window but the problem remained! At about 10:30 PM (15 minutes ago) I discovered that it can't initialize the main window (hwnd = CreatWindow(blah,blah,blah)) but still unsure of the problem...Finally, after a whole day I discovered that the problem lied in WNDCLASSEX declaration:WNDCLASSEX wndclex;which SHOULD look like this:WNDCLASSEX wndclassex = {0};AAAAAAAAAARRRRRRRRRGGGGGGGGHHHHHHHHH!!!!!!!!Programming can be frustraiting... btw, am I the only one who makes these type mistakes? is it a newbie thing or a global thing? Well, I just have a quiestion, well 3:1. Does = (0) set all the settings to default? Cause when I was setting wndclassex settings (name, size etc.) I did not set all the options (I'm a begginer and wasn't aware of that) and then in the tutorial I saw that = (0) (they didn't explain what it was though and it wasn't in the first one where they set all the settings so I forgot about it)...2. Why did my program ran from the compiler but didn't work from an EXE?3. What's the difference between compile/make all/build all (I can guess that compile compiles a single file unlike the all ones which compile whole project) ?[edited by - Koobazaur on August 2, 2003 2:10:55 AM]
  Unfortunately, what you discribed... it''s a newbie thing.  I''ll be honest I''m a newbie to computer game programming also, but i know enough to first find myself the best book possible to help along with the learning curve.  A lot of people swear by the online tutorials that they read, yet those tend to be non-explanitory and usually don''t conform to standardized rules of writing code.  What usually happens for me is that when I read those tutorials I copy/paste someone elses code without learning what drives it. =(  I don''t know about how to answer your questions, but I will say that if you''re a student I would suggest getting the academic version of Visual Studio .Net... it takes care of these declarations, includes the necessary win32 libs in a header file, creates resources, you name it.  It''s only $90 at college and it''s well worth it. ;  Actually it is not a newbie thing.  The more experience you get the easier it will be to find unitialized variables, but developers at all levels make this mistake.   ;  compile - compiles the (cpp) FILE into an object filemake all - compiles all files of the project or associated make file which are detected as out-of-date (older than something they depend upon).  The make process does NOT rebuild targets which are not out of date ...rebuild all - compiles all files of the project or associated make file, not checking for out-of-date (actually it simply performs a "clean" followed by a "make all" as far as I can tell) ...the reason to use a rebuild instead of make, is because the IDE often gets confused (on Visual Studio 6 or earlier at least ... I do not have this problem yet with Visual Studio .NET) ... so often you will get a false alarm compile error simply because the compiler is in an invalid state ... and this can be solved by either doing a "clean" or a "rebuild all"ALSOthis line:WNDCLASSEX wndclassex = {0};is not strictly correct as far as I know ... if the stuct does not have a defined constuctor which zeros it out ... and you want it zero''d out ... you must do it yourself ...the original windows SDKs said this should be done as follows ...WNDCLASSEX wndclassex;ZeroFill(&wndclassex, sizeof(wndclassex));the first line simply allocates the space (and would have executed a default constructor if there was one ... but in this case there isn''t ...so the second line zero''s out the memory ...this is NOT normal for object-oriented libraries (you should not normally go messing with the bits of an object oriented library directly) ... but the Windows API is NOT object oriented ... in fact it is written in C ... so there are no constuctors at all ... no initializers or associated functions for the structs at all ... so they had to do it this way ...