message anatomy
Every GraphicsDesigner message contains 8 XLONG values:

( window, message, v0, v1, v2, v3, r0, r1 )
... or ...
( grid, message, v0, v1, v2, v3, r0, r1 )
... or ...
( wingrid, message, v0, v1, v2, v3, r0, r1 )

window, grid, wingrid
window contains the window number the message refers to.

grid contains the grid number the message refers to.

wingrid contains the window or grid number a message refers to. wingrid is the name given to arguments that contain a window number in some contexts, and a grid number in others.

message AKA message number
message contains a message number. Message numbers are initially based on strings like "MouseDown " , but messages contain message numbers so programs must get the message number for every message they use when they start up and assign them to similar named variables like #MouseDown .

The message number for any message name string is returned by two functions, the only difference being that XgrRegisterMessage() creates a new message number for message names that don't already exist, while XgrMessageNameToNumber() returns zero, which is an invalid message number.

XgrRegisterMessage ( messsage$, @message )
XgrMessageNameToNumber ( message$, @message )

v0 ,v1 ,v2 ,v3 ,r0 ,r1 contain message arguments whose meanings depend on message . For example, in mouse messages v0,v1,v2,v3,r0,r1 contain x,y,state,time,0,0 .

In some messages, one or more arguments contains no defined value. GraphicsDesigner and GuiDesigner always fill these arguments with zero when calling other programs, and expect to receive zeros in these arguments from other programs.