Hi, I was reading a article on the internet where they mentioned callback function but didnīt explain it. What is a callback function???
Hi, I was reading a article on the internet where they mentioned callback function but didnīt explain it. What is a callback function???
A callback is a pointer to a function that can be passed around and called when needed.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
Funny... those I just call "pointer to func". A bit more self explaining
Well english isn't my first language, (it's instead a useless language called danish which only 5 milion people speak!!) so if you think my grammar SUCKS (it does by the way) than you're more then welcome to correct me.
Hell I might even learn something
in windows programing (WIN32 API ect) a callback function is where you process messages sent by windows.
It is mainly a complex nested switch statement.
All init, close, mouse, keyboard and paint messages ect are sent to your application and then forked and sent to the dialog that generated them.
you can process the message or pass it back to windows for default processing.
this is the standard form
LRESULT CALLBACK MainCallback(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam)
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill