Of course, as for the detailed implementation of callback functions, you need to study them with great efforts. Here I just want to summarize:
1. The callback function is defined by the developer according to a certain prototype (each callback function must be designed according to this prototype)
For example:
------------------------------------------
Bool callback DialogProc (
HWND hwndDlg, // handle of dialog box
UINT uMsg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
------------------------------------------
Note:
The CALLBACK function must have the keyword CALLBACK.
The callback function must be a global or static function and cannot be defined as a member function of a specific class.
2. The callback function is not directly called and executed by the developer (only the system interface API function is used as the starting point)
3. The callback function is usually passed to the system API as a parameter, which calls
4. The callback function may be called once by the system API or cyclically multiple times (SortItem is self-called)
In the end, there is another mechanism in windows-message mechanism, which is also a good tool to provide solutions for many practical problems, this is further summarized.
& Nbs