mohabouje / WinToast

WinToast is a lightly library written in C++ which brings a complete integration of the modern toast notifications of Windows 8 & Windows 10. Toast notifications allows your app to inform the users about relevant information and timely events that they should see and take action upon inside your app, such as a new instant message, a new friend request, breaking news, or a calendar event.
MIT License
716 stars 132 forks source link

"Interesting" behavior when showing the first notification after creating a shortcut #105

Open SerhiiPavlyk opened 4 months ago

SerhiiPavlyk commented 4 months ago

Hi everyone. I have an issue when using this library and the console application example. The virtual machine environment on which I ran the application is Windows 11 x64. The application was built using Microsoft Visual Studio 2017 and the latest version of the library. https://github.com/user-attachments/assets/818466d9-224f-461f-a95c-50d3e7f53614

You can watch a video recording of the demonstration. To describe an interesting behavior, when the first notification is displayed when the application is launched, the notification is displayed without the application icon and/or application name. It is quite certain that this is somehow related to the creation of a shortcut. Perhaps someone can help with this problem or has encountered it before and knows how to solve it? Perhaps this is the default behavior for Windows 11, does anyone know? I would be grateful for your time and any advice in this regard.

axoroll7 commented 2 months ago

If I create a portable app, and I put the "App User Model Id" of a system app, the first notification has the title and icon of the system app. The second notification has the title and icon of my application. Is the startup shortcut already created when you launch your application? Which entry does your "App User Model Id" refer to?

EDIT: Sorry, I just reread your message. You say that the shortcut is created on the fly. It would be better if your installer created the shortcut beforehand.