-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanest Way to Hide Toast from IWinToastHandler #104
Comments
As you mentioned, the default mechanism to hide a toast after some time is setting the duration. When the user clicks the notification, Activated or Dismissed will be called. Can you explain what's missing?
|
Thanks for the response. I'm guessing you're referring to the overrides. I understand the library a lot better now through experimentation. What I was wondering though was what the best way to link the event handlers to my other class objects was. Right now I passed a pointer to the main screen object to the handler and then used that pointer to connect the handler with the rest of my code. Is this the best way to do things? I'm not super well versed in design patterns although I studied them a while back.
|
Hi I'm wondering what the cleanest way to hide a toast from a IWinToastHandler derived class is. I would like to be able to hide toasts after a certain amount of time; I assume you do this with WinToastTemplate::setExpiration and then you handle the expiration with WinToastDismissalReason::TimedOut in the CustomWinToastHandler::toastDismissed overrride function. Also I would like to hide toasts after clicking buttons and clicking the toast itself and this obviously falls under the same coding technique as the first. Thanks!
The text was updated successfully, but these errors were encountered: