Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Callback Functions? 2

Status
Not open for further replies.

Valius

Programmer
Oct 20, 2000
174
US
I've seen them but haven't really looked into them. Can someone just give me a brief description of what a callback function is? Thanks in advance!

Niky Williams
NTS Marketing
Niky.Williams@ntsmarketing.com
 
Callback functions are functions that receive messages from the operating system. They are functions that you implement in your application and that Windows calls if you have one defined. Like the WindowProc() function for processing windows messages in Win32 applications. You have to define that function so windows knows how to deal with messages it sends to your app. Some CALLBACK functions are mandatory like the WindowProc() function or some are ones you might implement if avaiable to achieve greater control over how your program operates in different situations in Windows. For example DirectX has a lot of CALLBACK functions you can implement to do different things when different things happen, but at the sametime you don't have to implement most of them if you don't need the extra functionality. CALLBACK functions are more or less slightly more advanced function pointers.

Helpful?
-bitwise
 
Cool, thanks for the explaination....it helped a lot!

Niky Williams
NTS Marketing
Niky.Williams@ntsmarketing.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top