hello,
How can I encapsulate a callback function in a C++ class:
// customised telephony class
class CTelMan
{
...
// to initialise line and call
void Initl();
// actually make the call
void MakeCall(LPCTSTR aPhoneNum);
// TODO: callback from line, call request completed
// ? should be static ?
void HandleCallEventL( DWORD hDevice,
DWORD dwMsg,
DWORD dwCallbackInstance,
DWORD dwParam1,
DWORD dwParam2,
DWORD dwParam3
);
....
};
void CTelMan::MakeCall(LPCTSTR aPhoneNum)
{
....
lineOpen(...)
}
void CTelMan::HandleCallEventL( DWORD hDevice, DWORD dwMsg,
DWORD dwCallbackInstance,
DWORD dwParam1,
DWORD dwParam2,
DWORD dwParam3
)
{
// ? how to use the following callback function encapsulated in a class ?
? lineCallbackFunc( hDevice, dwMsg, dwCallbackInstance, dwParam1,
dwParam2, dwParam3)
}
best regards,
Olive