   CALLBACK? no, you call me instead!
  Hi,I''ve been looking all over for the meaning, or the eaxct purpose of the CALLBACK tag in Win32 programming, but i can''t find a good solid definition. i''ve googled, searched MSDN. I''ve left the forums as my last option.So, exactly what is the purpose of CALLBACK? since a function can just be called and control returns to the calling function, whats the point/purpose of CALLBACK?  
  I invite you to have a look at this, It''s a tutorial about callbacks.http://www.newty.de/CCPP/callback/callback.htmlNow about ''what''s it for?''.  It is a means to access a function via a pointer, so it enables you to write a rather flexible program, one calling one-of-several functions without the use of a switch statement. Better yet, it might call one-of-several functions That the program was not aware of at compile timeAn example: Windows needs to ''tell a program things'' through messages. Like ''The user clicked on [x], it''s time you shutdown''. But obviously the program you are making today wasn''t known back when Windows was being written, right?  So they just designed a standard interface - the functions used by your code, that the OS can call have to follow a certain pattern. Hence the CALLBACK.This helps?    =^.^=   Leaders and teachers should remember: It is best to offer others what they Need, not what they Want.  ;  Windows callback functions need to follow a certain calling convention. CALLBACK is #defined to whatever calling convention that should be.  ;  CALLBACK is used to specify the calling conventions of a function. Since Windows has been compiled to call all callbacks with a specific convention they created the CALLBACK macro that expands to the calling convention specification that Windows expects callbacks to have.This page at MSDN says:quote:In programs written for the graphical user interface of Windows, PASCAL, WINAPI, and CALLBACK are all defined with __stdcall. But the C language default is still cdecl.  