Solved

How do I send/post messages?

Posted on 1998-10-31
4
136 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 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

19 Experts available now in Live!

Get 1:1 Help Now