GeekInterview.com
Series: Subject: Topic:
Question: 24 of 27

How is message handling handled in Delphi?

Asked by: nehalshah | Member Since Sep-2006 | Asked on: Mar 25th, 2007

View all questions by nehalshah   View all answers by nehalshah

Showing Answers 1 - 2 of 2 Answers
delphiking

Answered On : Jan 9th, 2009

View all answers by delphiking

Through event handlers. You can also define your own messages using the WMUSER constant.

  
Login to rate this answer.
EditCDC

Answered On : Jul 16th, 2009

View all answers by EditCDC

Define custom message
const
  WM_MY_MESSAGE = WM_USER + 0;

Define handler for message
  type
  TMyForm = class(TForm)
  private
    procedure OnMyMessage(var Msg: TMessage); message WM_MY_MESSAGE;

Send or Post message
  PostMessage(self.Handle,WM_MY_MESSAGE,0,0)

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.