共用方式為


GameChatOverlayMessageSource.MessageReceived 事件

定義

每次收到訊息時引發的事件。 此 API 不適用於所有應用程式。 除非您的開發人員帳戶是由 Microsoft 特別布建,否則您的應用程式無法使用此 API。

// Register
event_token MessageReceived(TypedEventHandler<GameChatOverlayMessageSource, GameChatMessageReceivedEventArgs const&> const& handler) const;

// Revoke with event_token
void MessageReceived(event_token const* cookie) const;

// Revoke with event_revoker
GameChatOverlayMessageSource::MessageReceived_revoker MessageReceived(auto_revoke_t, TypedEventHandler<GameChatOverlayMessageSource, GameChatMessageReceivedEventArgs const&> const& handler) const;
public event TypedEventHandler<GameChatOverlayMessageSource,GameChatMessageReceivedEventArgs> MessageReceived;
function onMessageReceived(eventArgs) { /* Your code */ }
gameChatOverlayMessageSource.addEventListener("messagereceived", onMessageReceived);
gameChatOverlayMessageSource.removeEventListener("messagereceived", onMessageReceived);
- or -
gameChatOverlayMessageSource.onmessagereceived = onMessageReceived;
Public Custom Event MessageReceived As TypedEventHandler(Of GameChatOverlayMessageSource, GameChatMessageReceivedEventArgs) 

事件類型

適用於