
how to let a global function pointer point to a function in a Class
you need to declare the get_frequency type as a pointer-to-member-function
rather than pointer-to-function (they have different syntax and semantics).
--
Roger Onslow
Software Developer
See my articles at http://www.codeguru.com
See the product I am working on at http://www.swishzone.com
"Operator .. give me the number for 911" .. Homer Simpson
Quote:
> Something like that,
> extern void (*get_frequency)( int oref, int l_frequency);
> class TuneDlg : public CDialog
> {
> public:
> TuneDlg(CWnd* pParent = NULL); // standard constructor
> enum { IDD = IDD_TUNE };
> protected:
> virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
> void GetFrequency( int oref, int l_frequency);
> DECLARE_MESSAGE_MAP()
> };
> get_frequency=GetFrequency;
> I get a error, "can not covert void* to TuneDlg::*.