Function pass issue...

Hi,

I have this:

void __fastcall TERDmarker::LecERDClick(TObject *Sender)
{

LecERD->Picture = *pct; //LecERD->Execute();
}
//---------------------------------------------------------------------------



//---------------------------------------------------------------------------

void __fastcall TERDmarker::openimage21Click(TObject *Sender)
{
TPicture * pct = new TPicture;

pct->LoadFromFile("C:\Users\Yassar\Desktop\vpbmp");

// LecERD->Picture = pct;
}

What i am trying to do is, get openimage2click to open an image and save it to pct......
then pass the pct data into the LedERDclick.....i dont know how to pass the info and so on :D

any help or information would be great

Thank you
Why "pass" the info? Aren't openimage21Click and LecERDClick members of the same object? If so, you just set a private field to pct in openimage21Click and use that in LecERDClick...
Hi, im abit new to programming so im sorry if i dont reply well but...


Openimage21click is a tab at the top where the use will click and it will load the imaage and.......
LecERDClick is a TImage....
i have done this as well:

void __fastcall TERDmarker::LecERDClick(TObject *Sender)
{


}
//---------------------------------------------------------------------------



//---------------------------------------------------------------------------

void __fastcall TERDmarker::openimage21Click(TObject *Sender)
{
TPicture * pct = new TPicture;

pct->LoadFromFile("C:\Users\Yassar\Desktop\vpbmp");

LecERD->Picture = pct;
}


But when i do this...nothing happens



So by object i am assuming you mean they are part of the same thing.
To be honest, I don't really understand your initial set up from just that.

Is TERDmarker a class or a namespace? What is LecERD? And why do you not use the [ code][ /code] tags?
Last edited on
Do not worry, i have fixed the problem woohooo

thank you for your help
Topic archived. No new replies allowed.