You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-26Lines changed: 28 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,14 +18,16 @@ WinToast is a lightly library written in C++ which brings a complete integration
18
18
19
19
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.
20
20
21
-
1.[Toast Templates](#id1)
22
-
2.[Event Handler](#id3)
23
-
3.[Expiration Time](#id4)
24
-
4.[Additional features available on Windows 10](#id5)
25
-
5.[Error Handling](#id2)
26
-
6.[Example of usage](#id6)
27
-
7.[Toast configuration on Windows 10](#id7)
28
-
8.[Projects using WinToast](#id8)
21
+
-[WinToast](#wintoast)
22
+
-[Toast Templates](#toast-templates)
23
+
-[Event Handler](#event-handler)
24
+
-[Expiration Time](#expiration-time)
25
+
-[Additional features available on Windows 10](#additional-features-available-on-windows-10)
26
+
-[Error Handling](#error-handling)
27
+
-[Example of Usage](#example-of-usage)
28
+
-[Installation](#installation)
29
+
-[Toast configuration on Windows 10](#toast-configuration-on-windows-10)
30
+
-[Projects using WinToast](#projects-using-wintoast)
29
31
30
32
31
33
<divid='id1' />
@@ -36,14 +38,14 @@ WinToast integrates all standard templates available in the [ToastTemplateType e
36
38
37
39
| Template | Description | Example |
38
40
| :------- | ----: | :---: |
39
-
|`ImageAndText01`| A large image and a single string wrapped across three lines of text. ||
40
-
|`ImageAndText02`| A large image, one string of bold text on the first line, one string of regular text wrapped across the second and third lines. ||
41
-
|`ImageAndText03`| A large image, one string of bold text wrapped across the first two lines, one string of regular text on the third line. ||
42
-
|`ImageAndText04`| A large image, one string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line. ||
43
-
|`Text01`| Single string wrapped across three lines of text. ||
44
-
|`Text02`| One string of bold text on the first line, one string of regular text wrapped across the second and third lines. ||
45
-
|`Text03`| One string of bold text wrapped across the first two lines, one string of regular text on the third line. ||
46
-
|`Text04`| One string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line. ||
41
+
|`ImageAndText01`| A large image and a single string wrapped across three lines of text. ||
42
+
|`ImageAndText02`| A large image, one string of bold text on the first line, one string of regular text wrapped across the second and third lines. ||
43
+
|`ImageAndText03`| A large image, one string of bold text wrapped across the first two lines, one string of regular text on the third line. ||
44
+
|`ImageAndText04`| A large image, one string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line. ||
45
+
|`Text01`| Single string wrapped across three lines of text. ||
46
+
|`Text02`| One string of bold text on the first line, one string of regular text wrapped across the second and third lines. ||
47
+
|`Text03`| One string of bold text wrapped across the first two lines, one string of regular text on the third line. ||
48
+
|`Text04`| One string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line. ||
**Note:** The user can use the default system sound or specify a sound to play when a toast notification is displayed. Same behavior for the toast notification image, by default Windows try to use the app icon.*
57
-
59
+
58
60
<divid='id3' />
59
61
60
62
## Event Handler
@@ -79,13 +81,13 @@ class WinToastHandlerExample : public IWinToastHandler {
Set the time after which a toast notification is no longer considered current or valid and should not be displayed. Windows attempts to raise toast notifications immediately after you call Show, so this property is rarely used.
88
-
90
+
89
91
> For Windows 8.x app, this property also causes the toast notification to be removed from the
90
92
> Action Center once the specified data and time is reached.
91
93
@@ -111,7 +113,7 @@ actions.push_back(L"No");
111
113
for (auto const &action : actions)
112
114
templ.addAction(action);
113
115
WinToast::instance()->showToast(templ, handler)
114
-
```
116
+
```
115
117
116
118

117
119
-**Attribution text**: you can add/remove the attribution text, by default is empty. Use `WinToastTemplate::setAttributionText` to modify it.
@@ -163,7 +165,7 @@ if (!launched) {
163
165
std::wcout << L"Error: Could not launch your toast notification. Error: "
164
166
<< error << std::endl;
165
167
}
166
-
```
168
+
```
167
169
168
170
<div id='id6' />
169
171
@@ -188,7 +190,7 @@ if (!WinToast::isCompatible()) {
0 commit comments