Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
こんにちは、Platform SDK (Windows SDK) サポートチームです。
今回は、Windows 10 における、トースト通知に関する現象についてお知らせします。
まずは、以下のブログでもご案内しておりますが、Windows 10 におけるバルーン チップとトースト通知に関する仕様変更について、お伝えします。
Windows 10 におけるバルーン チップのイベント通知仕様について
<https://blogs.msdn.com/b/japan_platform_sdkwindows_sdk_support_team_blog/archive/2016/02/03/windows-101.aspx>
タスクトレイにアイコンを表示して常駐するアプリケーションから、ユーザーへ通知を行う手段の一つとして、バルーン チップがあります。
Windows 10 では、バルーン通知をトースト通知に変換する機能が既定となっています。
このため、Windows 8.1 以前にバルーン チップを表示させていたアプリケーションを、Windows 10 にて使用した場合、バルーン チップではなくトースト通知として表示されます。
Windows 10 Pro、Windows 10 Enterprise、Windows 10 Education では、以下のとおりグループ ポリシーを変更することにより、トースト通知ではなく、バルーンチップとして表示することが可能となります。
同じアプリケーションを使用した場合、設定前後で以下のように表示が異なります。
上記設定により、Windows 10 の既定では、Shell_NotifyIcon 関数にてバルーン チップを表示した場合も、トースト通知に変換されます。
この際、バルーン チップを表示した場合と、トースト通知を表示した場合とで、表示可能な文字数が異なります。
Shell_NotifyIcon 関数を用いてバルーン チップを表示する場合、NOTIFYICONDATA 構造体の、szInfo に対して、文字列を指定することにより、バルーン チップ上に文字列を表示可能となります。文字列の最大サイズは、255 バイトとなりますので、半角文字では 255 文字を表示することができます。
しかしながら、Windows 10 のトースト通知では、この文字列の最大サイズが、144 バイトに制限されています。
このため、文字数が多いバルーン チップを表示する場合、同じアプリケーションを使用しても、設定前後で以下のように表示が異なります。
本現象は、Windows 10 における制限です。
ご不便をおかけし恐れ入りますが、本動作を変更する OS の設定や、アプリケーションの実装はありません。
アプリケーション側で、表示する文字数を制限文字数内に収まるよう実装ください。
ご参考までに、今回ご案内した各関数のドキュメントを以下にご紹介します。
Shell_NotifyIcon function
<https://msdn.microsoft.com/ja-jp/library/windows/desktop/bb762159(v=vs.85).aspx>
NOTIFYICONDATA structure
<https://msdn.microsoft.com/ja-jp/library/windows/desktop/bb773352.aspx>
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in