Board index » cppbuilder » Sending message to all forms

Sending message to all forms


2004-12-14 06:24:18 PM
cppbuilder38
How can I send a message to all currently open forms in an application? Does
the Application object have a list of all current forms?
John Franklin
 
 

Re:Sending message to all forms

"John Franklin" < XXXX@XXXXX.COM >wrote in message
Quote
Does the Application object have a list of all current forms?
No, but the global TScreen object does.
Gambit
 

Re:Sending message to all forms

Thanks, that's very useful to know (I never seem to consider TScreen).
Actually, I've solved my own current problem by iterating through the WinAPI
GetWindow() from the main form.
Regards,
John Franklin
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"John Franklin" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...

>Does the Application object have a list of all current forms?

No, but the global TScreen object does.


Gambit


 

{smallsort}

Re:Sending message to all forms

Quote
How can I send a message to all currently open forms in an application?
Does
the Application object have a list of all current forms?

int app=BSM_APPLICATIONS;
unsigned long bsm_app=(unsigned long )app;
BroadcastSystemMessage(BSF_POSTMESSAGE,&bsm_app, WM_CLOSE,NULL,NULL);
This close all windows, also explorer...