Skip to content

Commit f693b8e

Browse files
authored
Fixing broken examples as the custom handler has changed
1 parent 0baa2d0 commit f693b8e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

examples/console-example/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ class CustomHandler : public IWinToastHandler {
1616
exit(16 + actionIndex);
1717
}
1818

19+
void toastActivated(const char* response) const {
20+
std::wcout << L"The user clicked on action #" << response << std::endl;
21+
}
22+
1923
void toastDismissed(WinToastDismissalReason state) const {
2024
switch (state) {
2125
case UserCanceled:

examples/qt-gui-example/mainwindow.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,14 @@ class CustomHandler : public IWinToastHandler {
6969
std::wcout << L"The user clicked on button #" << actionIndex << L" in this toast" << std::endl;
7070
}
7171

72+
void toastActivated(const char* response) const {
73+
std::wcout << L"The user clicked on action #" << response << std::endl;
74+
}
75+
7276
void toastFailed() const {
7377
std::wcout << L"Error showing current toast" << std::endl;
7478
}
79+
7580
void toastDismissed(WinToastDismissalReason state) const {
7681
switch (state) {
7782
case UserCanceled:

0 commit comments

Comments
 (0)