So, if I get it right, you are saying that the callback has no "spare" or "user defined" parameters that you could use to pass for example a pointer to your object?
Can you perhaps tie the object to some parameter that is known (and unique) in the callback - for example, if you have a "HWND" that is a handle to your particular window, you could use that in to find your object back again, by having a structure like this:
Code:
struct hwnd_to_object
{
HWND hwnd;
CObject *pObject;
} hwnd_list[10];
...
i = find_next_free(hwnd_list);
hwnd_list[i].hwnd = hwnd;
hwnd_list[i].pObject = myObject;
...
I'm not saying you have to use the HWND, but anything that is unique that is known at bot ends of the call is what you need.
--
Mats