WinToast icon indicating copy to clipboard operation
WinToast copied to clipboard

Question About Wintoast notification

Open DevX-Cipher opened this issue 2 years ago • 1 comments

hope this message finds you well. I am currently working on a project that involves the implementation of an action button within a context menu for handling toast notifications. Specifically, I am encountering challenges with the temp1.addAction functionality in my code.

Below is the snippet of the code in question:


WinToastTemplate CustomTemplate() {
    WinToastTemplate templ;
    templ = WinToastTemplate(WinToastTemplate::ImageAndText02);

    WinToastTemplate::CropHint::Circle;

    templ.setTextField(L"Hello World!", WinToastTemplate::FirstLine);
    templ.setTextField(L"This is a toast notification", WinToastTemplate::SecondLine);

    // Add action buttons
    templ.addAction(L"Open");

    return templ;
}

DevX-Cipher avatar Nov 12 '23 10:11 DevX-Cipher

so the addAction does not work on windows 11 for some reason

DevX-Cipher avatar Nov 20 '23 04:11 DevX-Cipher