overriding an OnObjectClick event....
Hi there!
there is a problem:
i'm using C++ Builder 5 and FastReport 2.51. in my app i have to allocate memory dinamycally for TfrReport class, i mean in runtime so i'm unable to write some code to an OnObjectClick event. i could have done it only in designer mode. So, i decided to solve this problem his way:
1) create an derived class myTFRREPORT
2) create my function (objclick) which is supposed to replace the standart event for OnObjectClick.
this is the code:
/*********************************************
class myTFRREPORT :public TfrReport
{
public:
__fastcall myTFRREPORT(TComponent * AOwner):TfrReport(AOwner)
{OnObjectClick = objclick; };
void __fastcall objclick(TfrView * View);
} ;
/*************************************
in the objclick function i call the ShowMessage ("hi!") function.
AND THIS DOESNT WORK (i'm given no error messages).
there is a problem:
i'm using C++ Builder 5 and FastReport 2.51. in my app i have to allocate memory dinamycally for TfrReport class, i mean in runtime so i'm unable to write some code to an OnObjectClick event. i could have done it only in designer mode. So, i decided to solve this problem his way:
1) create an derived class myTFRREPORT
2) create my function (objclick) which is supposed to replace the standart event for OnObjectClick.
this is the code:
/*********************************************
class myTFRREPORT :public TfrReport
{
public:
__fastcall myTFRREPORT(TComponent * AOwner):TfrReport(AOwner)
{OnObjectClick = objclick; };
void __fastcall objclick(TfrView * View);
} ;
/*************************************
in the objclick function i call the ShowMessage ("hi!") function.
AND THIS DOESNT WORK (i'm given no error messages).