Главная страница | назад





Article #15590: How do I catch user defined messages in BCB?

 Question and Answer Database

FAQ590C.txt   How do I catch user defined messages in BCB?
Category   :VCL
Platform    :All
Product    :C++Builder  1.x

Question:

How do I catch a user defined message in BCB?

Answer:

Add to your form definition:

BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(MESSAGE_NAME, MESSAGE_TYPE, METHOD)
END_MESSAGE_MAP

and declare METHOD as a public member of the form.

Then implement METHOD as you normally would.

(Note that this does not work well for messages which
are registered via RegisterWindowMessage, but only for
messages which are #defines.)

7/2/98 10:32:32 AM
 

Last Modified: 01-SEP-99