Peg System Messages - Casio ClassPad 300 Programming Manual

Sdk programming guide
Hide thumbs Also See for ClassPad 300:
Table of Contents

Advertisement

use by PEG may change slightly in future releases, and the library therefore provides a
#define indicating the first message value which is available for user definition. This
#define is called FIRST_USER_MESSAGE.

Peg System Messages

PEG messages can be divided into two types: PEG system messages and USER messages.
As we just mentioned, whether a message is a system message or a user message is
determined by the value of the message wType field.
PEG uses system messages internally to command objects to perform certain operations.
For example, before an object is drawn PEG sends the internal message PM_SHOW.
PEG knows that any preparation to that needs to be done before drawing can be called
when that object's PM_SHOW message is received.
It is very common to want to receive and process system messages within your
application. This is sometimes called 'intercepting' a message, because you can catch a
message that PEG has sent to an object and change the interpretation of the message, or
even cause the object to ignore the message entirely.
While at first you may want to avoid intercepting system messages, as your confidence in
working with the library grows you will find that this is often the most convenient way to
accomplish many tasks. Some of the common Peg System Messages are listed below.
For a complete list, refer to pmessage.hpp.
PM_ADD
PM_DESTROY
PM_SIZE
PM_CLOSE
PM_HIDE
PM_SHOW
This message can be issued to add an object to another
object. The message pTarget field should contain a pointer
to the parent object, and the message pSource filed should
contain a pointer to the child object.
This message is sent to PegPresentationManager to destroy
an object. The pSource member of the message should
point to the object to be destroyed.
This message is sent to an object to cause it to re-size. This
is equivalent to calling the Resize() function. Note that
PEG does not differentiate between moving an object and
resizing an object. Both are accomplished via the Resize
operation. The new size for the object is included in the
message Rect field.
This message is recognized by PegWindow derived
objects, and causes the recipient to remove itself from its
parent and delete itself from memory.
This message is sent to an object whenever it is removed
from a visible parent.
This message is sent to an object when it is added to a
visible parent, before the object is first drawn. This allows
an object to perform any necessary initialization prior to
24

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents