How to refer to Handle in a Components constructor?

just write whatever you want
Post Reply
Claes
Posts: 52
Joined: Thu Apr 22, 2004 10:52 pm
Location: Denmark

How to refer to Handle in a Components constructor?

Post by Claes »

Hi,

I have a self-made component that I'd like to improve in that way it will initiate my hook-stuff in it's own constructor (Create). To initiate the hook-stuff, I need the constrols Handle (Self.Handle) within the Constructor, but when I refer to it, I receive an "Control has no parent" exception. Anyone here know how/when can I safely query the Controls Handle?

- Claes

PS. I realize this is really an EE-question, but I'm not a member there anymore. Used it to little to pay them $10 a month... :o :sceptic:

So....

PPS. Can we have a forum for questions not directly related to MadCollection? :D
Claes
Posts: 52
Joined: Thu Apr 22, 2004 10:52 pm
Location: Denmark

if not (csDesigning in ComponentState) then...

Post by Claes »

if not (csDesigning in ComponentState) then...

Should solve it. Sorry for asking such a newb question... :o
Claes
Posts: 52
Joined: Thu Apr 22, 2004 10:52 pm
Location: Denmark

Post by Claes »

Actually, that didn't do it all, as the control didn't paint itself then. But overriding CreateWnd did the trick. ;)
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Does EE ask 10$ to be a member? Well, I'm still there and nobody asked me for any money!
fsurfer
Posts: 23
Joined: Thu Jul 08, 2004 9:53 am

EE and Money

Post by fsurfer »

madshi wrote:Does EE ask 10$ to be a member? Well, I'm still there and nobody asked me for any money!
madshi,

you don't need money to get points, you answer questions and get points.
When you don't have time to answer, but need to ask questions, you have to pay to get points...

that's what i understood... ;)

Guillaume
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

But you get 5 points every day for free or something like that. At least it was that way some years ago...
Claes
Posts: 52
Joined: Thu Apr 22, 2004 10:52 pm
Location: Denmark

Post by Claes »

I tried seaching for a solution to this problem there. I got lots of hits, but the solutions wasn't visible until I paid them. :( And the really sad thing is: To cancel your subscription, you need to fax or snailmail them a form - you can't cancel online! :sorry: And unless you cancel, they'll withdraw $10 from your account every month!

That's why I think it'd be great if we can have a forum for other stuff than madCollection. There are many good Delphi people here who can answer most of the questions, I believe. 8)
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

I don't have the time to host such an open forum here. I mean if I could just leave it alone, it would be fine. But after all people would also post there asking questions about my components. So I couldn't leave it alone.

You can ask general programming questions in the borland newsgroup, though. There you've a good chance to get good answers.
Claes
Posts: 52
Joined: Thu Apr 22, 2004 10:52 pm
Location: Denmark

Post by Claes »

You COULD leave it alone by assigning a moderator to filter the mad-stuff to the other forums. I'll be happy to do that, if you want me to. ;)

Btw, I really hate newsgroups.. ;)
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

And what happens if you somewhen decide that your girl friend is more important than being moderator? No, I'm really not feeling well with the idea. Look, I'm already spending too much time for support. I want to avoid anything which can end up in even more support work for me. I just can't afford it. Someone has to work on improving the components!
Claes
Posts: 52
Joined: Thu Apr 22, 2004 10:52 pm
Location: Denmark

Post by Claes »

madshi wrote:And what happens if you somewhen decide that your girl friend is more important than being moderator?
I've been married too long for that to happen! :o :lol: But hey, I get your point, and respect your decision... ;)
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Claes wrote:I've been married too long for that to happen! :o :lol:
:D
Post Reply