Microsoft DirectX 8.1 (Visual Basic) |
The Chat sample enables the host and players connected to a session to chat with each other by passing text strings.
Source: (SDK root)\Samples\Multimedia\VBSamples\DirectPlay\Chat
Executable: (SDK root)\Samples\Multimedia\VBSamples\DirectPlay\Bin
Refer to the User's Guide section of the SimplePeer sample.
The ChatPeer sample is very similar in form to the SimplePeer. ChatPeer differs by enabling clients to send text strings instead of funny faces to all players connected to the session.
When a player types a text string and presses ENTER, the txtSend_KeyPress function does the following:
When a player types a text string and presses Whisper, the cmdWhisper_Click function does the following:
The Chat sample handles the DPNMSG_RECEIVE message. On receipt of the message, the DirectPlay8Event_Recieve function:
See the DirectPlay8Event objects in the source code for more messages that the Chat sample handles.