I am trying to build a memory game with 16 pairs of cards.
I do not know exactly how to implement an OnClick
event. I am new at using C++Builder, so please help.
The images are in an array, I allocate them dynamically like this:
for(int i=0;i<4;i++)
{
for(int j = 0; j < 8 ; j++)
{
VectorOfImages[i*8+j]=new Card(9+i*112,9+j*112,pan, 0);
VectorOfImages[i*8+j]->image->Picture>LoadFromFile("...OOP\\c\\images\\0.bmp");
VectorOfImages[i*8+j]->image->Tag=i*8+j;
VectorOfImages[i*8+j]->image->Enabled=false;
}
}