Window Messages
Objects in Quantum that can receive Microsoft window messages
(WM_PAINT,
WM_SIZE,
etc.) have property lists, just as
Symbol's
do. When the Quantum message loop wants to dispatch a Microsoft window message
to a Quantum object, it searches the object's property list for a function associated
with the message. Quantum calls the object's function to handle the message.
If no function is found, some default action is performed. In the MyCat project,
you can see that there are message handlers for
_MyCatEraseBkGnd,
_MyCatSize, and
_MyCatClicked
to handle messages
WM_ERASE,
WM_SIZE, and
BN_CLICKED
installed on the
window
and
button
of this application. This is all set up in function
MyCat
when
CreateWindow
and
CreateButton
are called.
Reference Manual:
User Interface
|