In that case you could call TObject.Dispatch(Message) on the main form and then write a handler in the main form which calls Broadcast() to pass the same message to the child controls.
Todd. ----- Original Message ----- From: "Myles Penlington" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Wednesday, 19 March 2003 08:14 Subject: RE: [DUG]: PostMessage > TWinControl has the Broadcast() Method - will that do? > > J, You are right in that you don't need a A.ProcessMessage after the > SendMessage - SendMessage actually directly calls the WndProc. In my > opinion, I would call that a bad habit (One reason is that the term > "re-entrant" code comes to mind. Although this is an issue in itself within > the VCL - especially when you have message driven event handlers). > > Myles. > > -----Original Message----- > From: Jeremy Coulter [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 18 March 2003 10:35 p.m. > To: Multiple recipients of list delphi > Subject: RE: [DUG]: PostMessage > > > PostMessage, from my understanding, basically goes in a "Que" of other > messages and is delt with when the que reaches that point. > BUT if you use SendMessage it basically does it straight away...not > litterly but pretty much. > I always do an Application.ProcessMessages after SendMessage too. > Might not really help, but its habit I now have :-( > > Jeremy > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Neven MacEwan > Sent: Tuesday, 18 March 2003 22:28 > To: Multiple recipients of list delphi > Subject: [DUG]: PostMessage > > > Hi all > > In my app I have a whole lot of forms which are embedded in a page > control of the 'Main Form' If one one these forms wants to notify all > other forms in the app of a change, what is the best way to do it? > > Iv'e tried > > PostMessage(HWND_BROADCAST, WM_APPDATACHANGE, 0, 0); > > but none of the other forms seem to get this message, is this because I > really only have 1 form in my app? > > TIA > > > Regards Neven > N.K. MacEwan B.E. E&E > Ph 649 621 0001 > Fax 649 621 0400 > [EMAIL PROTECTED] > > -------------------------------------------------------------------- ---- > --- > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > > -------------------------------------------------------------------- ------- > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > -------------------------------------------------------------------- ------- > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
