• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

SendMessage question

I just want to know what parameter use to send a message to all windows of a same delphi3 application.
0
fmichaud061597
Asked:
fmichaud061597
1 Solution
 
ygolanCommented:
If all the windows are actually Delphi forms, the following code will do it :

For i := 0 to (Screen.FormCount - 1) do
  SendMessage(Screen.Forms[i].Handle, ......)

Note that you can use Screen.Forms[i].Perform(...) instead of SendMessage, this will be more efficient.

To send a message to the child windows of the forms as well, use
  Screen.Forms[i].Broadcast(...) instead.

To send a message to *all* windows of an application, including those not created as forms ar as controls in forms, you will need to use the API function EnumWindows.
0
 
fmichaud061597Author Commented:
Thanks for the awnser!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now