You should be more explicit. Demonstrate your ask with an example. So many answer are possible.
But maybe next demo could help.
Start an new project.
On your Form place a Memo, RichEdit, ListBox and a PopupMenu.
Set the property PopupMenu of Memo, RichEdit and ListBox to PopupMenu1.
Open the menu designer of PopupMenu1.
Set the caption property of PopupItem1 to “Clear”
Double click the onClick-event of PopupItem1.
Place next code:
void __fastcall TForm1::Clear1Click(TObject *Sender)
{
TRichEdit *ri;
TMemo *me;
TListBox *li;
if ((ri = dynamic_cast<TRichEdit *> (PopupMenu1->PopupComponent)) != 0)
ri->Lines->Clear();
if ((me = dynamic_cast<TMemo *> (PopupMenu1->PopupComponent)) != 0)
me->Lines->Clear();
if ((li = dynamic_cast<TListBox *> (PopupMenu1->PopupComponent)) != 0)
li->Items->Clear();
}
Thanks for the sample but this is not exactly what I want. I am trying to understand and modify a very complex program written by others. There are many files, classes, member functions within each classes. I have found the member function of interest. Now, I want to know which other functions (i.e. callers) call it. Is there a way to do it? Perhaps other programs that can automatically figure out how the functions call each other?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.