   Win32 API
  HelloI''m using the Win32 API template from Dev-C++ and am finding it difficult to see how people can understand the syntax.  I understand how the switch and the while loop works in it but i''m trying to understand how you can understand all the syntax in the switch.  I''ve forgotten exactly what it said but there was a case in the switch which said WM_POSTQUIT or something.  Is this standard syntax for the windows.h header file?I''m still finding it hard to understand all the parameters in it but this is just one thing that has confused me because i''m going to be including other buttons in the window.  Will these be needed in the switch?I''ll also be adding an image to the background of the window itself.  How is this done?Thanks in advance. 
  Win32 api isn''t exactly the most easy one to understand.. Check out www.winprog.orgIt''s a great tutorial explaining most of this. You can also look through the header files, wich may explain things..Windows API is a "message driven" API, so the WM_QUIT, WM_DESTROY, WM_PAINT, WM_COMMAND are only messages sent to your application by the OS, wich is then up to you to react on.. Don''t know if this only makes you more confused.. Better stop now. ;  Ok, well the WM_QUIT etc are only the names of the cases.  Are the names of the cases restricted in a sense that there is a set syntax to them?So this means that PostQuitMessage (0); is the function which is passed through the while loop in order for it to close.  What is the ''0'' parameter? ;  The general form of the names of the Windows messages is WM_something   where something is what the message does. For example WM_CLOSE is the message sent to a window when the user closes it.The parameter 0 in PostQuitMessage() is the number that (usually) the program will return to the OS when it ends. 0 means success.   Colin Jeanne | Invader's Realm"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud   [edited by - Invader X on May 12, 2004 7:02:00 PM]