Hi

I have a static structure with a member int (*repfn)(int state, const char * reply,int tout) – a function pointer.

I want to initialise the pointer within my dialog constructor to point to a member function of my dialog class.
Like this:
Code:
 CEnterDiagnostics::CEnterDiagnostics() : CPropertyPage(CEnterDiagnostics::IDD)
{
	//{{AFX_DATA_INIT(CEnterDiagnostics)
	//}}AFX_DATA_INIT

	StateMachine[0].repfn = OpenReply;
}
Where OpenReply is a member of my class CEnterDiagnostics and declared as

int OpenReply(int state, const char *pReply,int tout);

But it doesn’t work I get a compiler error

C2440: '=' : cannot convert from 'int (__thiscall CEnterDiagnostics::*)(int,const char *,int)' to 'int (__cdecl *)(int,const char *,int)'

Is there a way to do this?

Thanks

Alec