Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parent handling child event...?

Status
Not open for further replies.

GermanB

Programmer
Nov 22, 2001
5
AR
My project has a main form with a frame that can hold occurrences of another frame (these are created programatically). I need to handle the double-click event of this child frame to take some action at form level (e.g. the form displays info belonging to that child frame, in some other place). Since the frame can't see levels above itself, how am I supposed to do this? Can I handle the frame's OnDblClick event at form level? How? Thanks!
 
You need to look at how Windows handles messages. There are several ways to do this, e.g. pipes, semaphores, ect.

James P. Cottingham
-----------------------------------------
I'm number 1,229!
I'm number 1,229!
 
OK, I have dug a little bit on it and I think I got it. I added a message handler to the main form, after setting up a msg id for my message. Then, the child frame handles its own event calling Application->MainForm->Dispatch() with that message.
If there's anything wrong in doing it this way, I hope someone will point it out! Thanks...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top