BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with Handling Event OnClick and Overriding

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Sat Dec 16, 2006 2:22 am    Post subject: Problem with Handling Event OnClick and Overriding Reply with quote



Hi!

I have a problem with my project on University. I am to create a simple
game with X and O. I want to create 25 TImages, but with some more
parameters. So I tried to override a class TImage and got Errors I
cannot understand.

class myimage : protected TImage
{
public:
int get_number() const { return number; };
private:
int number;
};

Problem is, when I create dinamicaly a board 5x5 of myimage(s):

myimage * board[1][1];
board[1][1]= new pole;
board[1][1]->Width=100;
board[1][1]->Height=100;
board[1][1]->Top=100;
board[1][1]->Left=100;
board[1][1]->Show();

On: myimage * board[1][1]; it shows me the error:
[C++ Error] image1.cpp(25): E2125 Compiler could not generate default
constructor for class 'myimage'


Also I want to assign a function to OnClick Event to all those objects,
but don't know how to (I tried multiple options and it hasn't worked).
How to do that for myimage class? Let's say that I want to change value
of int number, when I click on myimage object.....

**Sorry about my English, I've learned it for so many years, but there
are still problems.
Back to top
Guest






PostPosted: Sat Dec 16, 2006 7:22 am    Post subject: Re: Problem with Handling Event OnClick and Overriding Reply with quote



Hi! It's me again.... about using Event OnClick I've made it lastly
myself, so now I need only help with classes....

Please help me fast.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.