Solved

How do I send/post messages?

Posted on 1998-10-31
4
137 Views
Last Modified: 2010-08-05
Hello,
I have a main form with 3 panels. I would like one panel to send a new WM message to the other panels.
I found some help about adding event handlers but I don't know how to actually send the message (after filling the lParam and wParam parametrs).
An example would be very helpful.

Thanks,
Tommy
0
Comment
Question by:tommyq
  • 2
  • 2
4 Comments
 

Author Comment

by:tommyq
ID: 1345175
Edited text of question
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 1345176
Hi tommyq,

you can use PostMessage or SendMessage.

SendMessage waits until message is processed, postmessage puts the message in the qeue and returns.

With Objects you can also use Perform. (like sendmessage, it waits until message is processed) :

RetVal := ObjectName.Perform(MessageID, wParam, lParam);

or

 SendMessage(hWnd, MessageID, wParam, lParam);

 PostMessage(hWnd, MessageID, wParam, lParam);

Regards, Zif.
0
 

Author Comment

by:tommyq
ID: 1345177
Thanks for your prompt reply, ZifNab.

How do I get the hWnd of a certain control?


0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1345178
Hi tommyq,

eg. Form1.Handle

Regards, Zif.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question