
2.1.4 Windows Messages

These messages provide the host computer's interface to the MS-Windows environment. 

2.1.4.1 Open Window

Byte 0 .. 2   : $AA,$FF,$FF      Message Header
Byte 3        : $30              Open Window message ID
Byte 4        : $winname         Byte count
Byte 5 .. nn  : winname (chars)  ASCII window name

Status Message:

Byte 0 .. 2   : $AA,$FF,$FF      Message Header
Byte 3        : $01              Byte count
Byte 4        : WIN-ID           Window ID

This message opens a new display window within PC-Share and gives it the name specified. A status message is returned indicating the new identity of the window just opened. A window ID of 0 is returned if the window could not be opened.

2.1.4.2 Close Window

Byte 0 .. 2   : $AA,$FF,$FF      Message Header
Byte 3        : $31              Close Window message id
Byte 4        : $01              Byte count
Byte 5        : WIN-ID           Window ID

This message close the display window with the given ident. If the window is not already open, this message is ignored.

2.1.4.3 Set Active Window

Byte 0 .. 2   : $AA,$FF,$FF      Message Header
Byte 3        : $32              Set Active Window message ID
Byte 4        : $01              Byte count
Byte 5        : WIN-ID           Window ID

This message sets the specified window as active for the host computer. All subsequent text, graphical and video control (eg. emulation select) output will then be sent to this window. This window need not be the same as the currently selected one within MS-Windows (see 2.1.4.4 Get Active Window).

2.1.4.4 Get Window Status

Byte 0 .. 2  : $AA,$FF,$FF       Message Header
Byte 3       : $33               Get Active Window Message ID
Byte 4       : $01               Byte count
Byte 5       : WIN-ID            Window ID

Status Message:

Byte 0 .. 2   : $AA,$FF,$FF      Message Header
Byte 3        : $nn              Byte Count
Byte 4 .. nn  : Input Text       Keyboard/Paste buffer

This message requests the PC to pass any textual data that may have been sent to the window id specified. This can come from the PC's keyboard or from the Windows clipboard via a Paste request. Up to 255 bytes of data may be returned in this message as specified by the byte count. A byte count of 0 indicates no data has been sent to the window.

2.1.4.5 Get Active Window

Byte 0 .. 2   : $AA,$FF,$FF      Message Header
Byte 3        : $34              Get Active Window message id
Byte 4        : $00              Byte Count

Status Message:

Byte 0 .. 2   : $AA,$FF,$FF      Message Header
Byte 3        : $01              Byte count
Byte 4        : WIN-ID           Window ID

This message requests the currently selected window within MS-Windows (ie. the one currently highlighted). If PCShare does not have the current focus, then the last valid window to be selected is returned.

