DirectX SDK

DPMSG_CHAT

The DPMSG_CHAT structure contains information for the DPSYS_CHAT system message. The system message is generated for a local player receiving a chat message from another player.

typedef struct{
    DWORD dwType;
    DWORD dwFlags;
    DPID  idFromPlayer;
    DPID  idToPlayer;
    DPID  idToGroup;
    LPDPCHAT  lpChat;
} DPMSG_CHAT, FAR *LPDPMSG_CHAT;
dwType
Identifies the message. This member has the value DPSYS_CHAT.
dwFlags
Not used.
idFromPlayer
ID of the player from whom the message originated. DPID_SERVERPLAYER indicates the message originated from the server.
idToPlayer
ID of the player to whom the message was directed. If this value is 0, then the message was sent to a group or broadcast to everyone.
idToGroup
ID of the group to whom the message was directed. If this value is 0 and idToPlayer is also 0, then the message was broadcast to everyone.
lpChat
Pointer to a DPCHAT structure containing the content of the chat message received.

Remarks

Use the idFromPlayer value to determine who sent the message. The value of lpidFrom available through Receive will always be 0, so you must retrieve the value of idFromPlayer in the DPMSG_CHAT structure.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dplay.h.

See Also

IDirectPlay4::SendChatMessage, DPCHAT, IDirectPlay4::Receive