Solved

How do I send/post messages?

Posted on 1998-10-31
4
135 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
Comment Utility
Edited text of question
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
Comment Utility
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
Comment Utility
Thanks for your prompt reply, ZifNab.

How do I get the hWnd of a certain control?


0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
Hi tommyq,

eg. Form1.Handle

Regards, Zif.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now