<bdo id='P2wRZ'></bdo><ul id='P2wRZ'></ul>

  1. <i id='P2wRZ'><tr id='P2wRZ'><dt id='P2wRZ'><q id='P2wRZ'><span id='P2wRZ'><b id='P2wRZ'><form id='P2wRZ'><ins id='P2wRZ'></ins><ul id='P2wRZ'></ul><sub id='P2wRZ'></sub></form><legend id='P2wRZ'></legend><bdo id='P2wRZ'><pre id='P2wRZ'><center id='P2wRZ'></center></pre></bdo></b><th id='P2wRZ'></th></span></q></dt></tr></i><div id='P2wRZ'><tfoot id='P2wRZ'></tfoot><dl id='P2wRZ'><fieldset id='P2wRZ'></fieldset></dl></div>

  2. <tfoot id='P2wRZ'></tfoot>

    <legend id='P2wRZ'><style id='P2wRZ'><dir id='P2wRZ'><q id='P2wRZ'></q></dir></style></legend>

    1. <small id='P2wRZ'></small><noframes id='P2wRZ'>

      Windows 10 Toast 通知桌面应用程序

      Windows 10 Toast Notifications Desktop Application(Windows 10 Toast 通知桌面应用程序)
        <bdo id='VCbtm'></bdo><ul id='VCbtm'></ul>
      • <small id='VCbtm'></small><noframes id='VCbtm'>

          <i id='VCbtm'><tr id='VCbtm'><dt id='VCbtm'><q id='VCbtm'><span id='VCbtm'><b id='VCbtm'><form id='VCbtm'><ins id='VCbtm'></ins><ul id='VCbtm'></ul><sub id='VCbtm'></sub></form><legend id='VCbtm'></legend><bdo id='VCbtm'><pre id='VCbtm'><center id='VCbtm'></center></pre></bdo></b><th id='VCbtm'></th></span></q></dt></tr></i><div id='VCbtm'><tfoot id='VCbtm'></tfoot><dl id='VCbtm'><fieldset id='VCbtm'></fieldset></dl></div>
        1. <legend id='VCbtm'><style id='VCbtm'><dir id='VCbtm'><q id='VCbtm'></q></dir></style></legend>

                  <tbody id='VCbtm'></tbody>
                <tfoot id='VCbtm'></tfoot>

                本文介绍了Windows 10 Toast 通知桌面应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试将一些 Windows 10 功能集成到我现有的 Windows 桌面应用程序中.我在集成 Toast 通知方面有些困难.使用 toast 通知示例 (https://code.msdn.microsoft.com/windowsdesktop/sending-toast-notifications-71e230a2/) 我能够实现代码来发送和隐藏通知.当用户点击活动"通知时,我的应用程序中的事件处理程序也会被调用.

                I'm trying to integrate some Windows 10 features into my existing Windows Desktop application. I am a little stuck integrating the Toast Notifications. Using the toast notification example (https://code.msdn.microsoft.com/windowsdesktop/sending-toast-notifications-71e230a2/) I was able to implement code to send and hide notifications. It also works, that when the user clicks on an 'active' notification an event handler in my application is invoked.

                但是,一旦通知在操作中心"中存档",用户点击我的通知时就不会发生任何事情.在这种情况下,我该如何对点击做出反应?

                However, as soon as the notification is 'archived' in the 'Action Center', nothing happens when the user clicks on my notification. How can I react to clicks in such situations?

                感谢您的帮助,

                卢卡斯

                推荐答案

                我开发了 WinToast,一个用 C++ 编写的库可以轻松集成 Windows Toast 通知.我用它在不同的项目中集成了 Toast 通知,特别是与 Qt 框架.

                I have developed WinToast, a library written in C++ to integrate Windows Toast Notification easily. I have used it to integrate Toast notifications in different projects, specially with Qt Framework.

                原生 Toast Notification 需要 Com Fundamentals 仅在现代版本的 Windows 中可用(最低支持的客户端:Windows 8).

                The native Toast Notification needs some functions of the Com Fundamentals which are availables only in moderns version of Windows (minimum supported client: Windows 8).

                这就是库动态加载所有必需库的原因.使用 WinToast 使您的应用程序与旧版本的 Windows 兼容.附带的示例说明了如何在存储库中使用它.

                That's why the library loads all the required libraries dynamically. Make your application compatible with older versions of Windows using WinToast. There is an attached example explaining how to use it in the repository.

                要显示祝酒词,只需创建模板和自定义处理程序并启动它:

                To show a toast, just create the template and your custom handler and launch it:

                WinToastHandlerExample* handler = new WinToastHandlerExample;
                WinToastTemplate templ  = WinToastTemplate(WinToastTemplate::ImageWithTwoLines);
                templ.setImagePath(L"C:/example.png");
                templ.setTextField(L"title", WinToastTemplate::FirstLine);
                templ.setTextField(L"subtitle", WinToastTemplate::SecondLine);
                
                if (!WinToast::instance()->showToast(templ, handler)) {
                   std::wcout << L"Could not launch your toast notification!";
                }
                

                这篇关于Windows 10 Toast 通知桌面应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                C++ stl unordered_map implementation, reference validity(C++ stl unordered_map 实现,参考有效性)
                C++: Is it possible to use a reference as the value in a map?(C++:是否可以使用引用作为映射中的值?)
                Where ampersand quot;amp;quot; can be put when passing argument by reference?(其中符号“amp;通过引用传递参数时可以放置吗?)
                Why can a non-const reference parameter be bound to a temporary object?(为什么可以将非常量引用参数绑定到临时对象?)
                What is a dangling reference?(什么是悬空引用?)
                C++ reference changes when push_back new element to std::vector(当 push_back 新元素到 std::vector 时,C++ 引用发生变化)
                <i id='WONnt'><tr id='WONnt'><dt id='WONnt'><q id='WONnt'><span id='WONnt'><b id='WONnt'><form id='WONnt'><ins id='WONnt'></ins><ul id='WONnt'></ul><sub id='WONnt'></sub></form><legend id='WONnt'></legend><bdo id='WONnt'><pre id='WONnt'><center id='WONnt'></center></pre></bdo></b><th id='WONnt'></th></span></q></dt></tr></i><div id='WONnt'><tfoot id='WONnt'></tfoot><dl id='WONnt'><fieldset id='WONnt'></fieldset></dl></div>
                <tfoot id='WONnt'></tfoot>

                  <bdo id='WONnt'></bdo><ul id='WONnt'></ul>

                        <tbody id='WONnt'></tbody>

                        <small id='WONnt'></small><noframes id='WONnt'>

                        1. <legend id='WONnt'><style id='WONnt'><dir id='WONnt'><q id='WONnt'></q></dir></style></legend>