最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c++ - Referencing compiled resources in .exe for with URI for toast notifications? - Stack Overflow

programmeradmin0浏览0评论

With a normal Win32 C++ application with compiled resource file (.rc), how does one reference the icons, bitmaps and png files from the resource using a URI required for toast notifications?

I presume it must have something to do with the ms-resource scheme but couldn't find any real information on this?

TIA

With a normal Win32 C++ application with compiled resource file (.rc), how does one reference the icons, bitmaps and png files from the resource using a URI required for toast notifications?

I presume it must have something to do with the ms-resource scheme but couldn't find any real information on this?

TIA

Share Improve this question edited Feb 7 at 7:51 Jack J Jun- MSFT 5,9861 gold badge13 silver badges44 bronze badges asked Feb 5 at 16:32 user3161924user3161924 2,3151 gold badge23 silver badges42 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Unfortunately, "toast notifications" (now formal known as "app notifications") simply do not support using images from an executable's resources. As documented on MSDN:

App notification content

The images you use in your toast notification can be sourced from...

  • http://
  • ms-appx:///
  • ms-appdata:///

As you can see, toasts do not allow ms-resource.

The ms-appx and ms-appdata URI schemes are documented on MSDN:

URI schemes

Use the ms-appx or the ms-appx-web URI scheme to refer to a file that comes from your app's package (see Packaging apps). Files in your app package are typically static images, data, code, and layout files. The ms-appx-web scheme accesses the same files as ms-appx, but in the web compartment.

Use the ms-appdata URI scheme to refer to files that come from the app's local, roaming, and temporary data folders. For more info about these app data folders, see Store and retrieve settings and other app data.

That same page also documents the ms-resource URI scheme:

Use the ms-resource URI scheme to refer to strings loaded from your app's Resources Files (.resw). For examples and more info about Resources Files, see Localize strings in your UI and app package manifest.

发布评论

评论列表(0)

  1. 暂无评论