forked from MicrosoftEdge/WebView2Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WebView2APISample.rc
313 lines (278 loc) · 11.3 KB
/
WebView2APISample.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#ifndef APSTUDIO_INVOKED
#include "targetver.h"
#endif
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_WEBVIEW2APISAMPLE ICON "WebView2APISample.ico"
IDI_SMALL ICON "small.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDC_WEBVIEW2APISAMPLE MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "Save Screenshot", IDM_SAVE_SCREENSHOT
MENUITEM "Get Document Title", IDM_GET_DOCUMENT_TITLE
MENUITEM "Get Browser Version After Creation", IDM_GET_BROWSER_VERSION_AFTER_CREATION
MENUITEM "Get Browser Version Before Creation", IDM_GET_BROWSER_VERSION_BEFORE_CREATION
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&Script"
BEGIN
MENUITEM "Inject Script", IDM_INJECT_SCRIPT
MENUITEM "Add Initialize Script", ID_ADD_INITIALIZE_SCRIPT
MENUITEM "Remove Initialize Script", ID_REMOVE_INITIALIZE_SCRIPT
MENUITEM SEPARATOR
MENUITEM "Post Message String", IDM_POST_WEB_MESSAGE_STRING
MENUITEM "Post Message JSON", IDM_POST_WEB_MESSAGE_JSON
MENUITEM SEPARATOR
MENUITEM "Subscribe to CDP event", IDM_SUBSCRIBE_TO_CDP_EVENT
MENUITEM "Call CDP method", IDM_CALL_CDP_METHOD
MENUITEM SEPARATOR
MENUITEM "Add COM object", IDM_ADD_HOST_OBJECT
MENUITEM SEPARATOR
MENUITEM "Open DevTools Window", IDM_OPEN_DEVTOOLS_WINDOW
END
POPUP "&Window"
BEGIN
MENUITEM "Set WebView Language", IDM_SET_LANGUAGE
MENUITEM "Toggle AAD SSO enabled", IDM_TOGGLE_AAD_SSO
MENUITEM "Close WebView", IDM_CLOSE_WEBVIEW
MENUITEM "Close WebView and cleanup user data folder", IDM_CLOSE_WEBVIEW_CLEANUP
MENUITEM SEPARATOR
POPUP "WebView Creation Mode"
BEGIN
MENUITEM "Windowed", IDM_CREATION_MODE_WINDOWED
MENUITEM "Visual - DComp", IDM_CREATION_MODE_VISUAL_DCOMP
MENUITEM "Target - DComp", IDM_CREATION_MODE_TARGET_DCOMP
#ifdef USE_WEBVIEW2_WIN10
MENUITEM "Visual - WinComp", IDM_CREATION_MODE_VISUAL_WINCOMP
#endif
END
MENUITEM "Create WebView" IDM_REINIT
MENUITEM "Create New Window", IDM_NEW_WINDOW
MENUITEM "Create New Thread", IDM_NEW_THREAD
END
POPUP "&Process"
BEGIN
MENUITEM "Browser Process Info", IDM_PROCESS_INFO
MENUITEM "Crash Browser Process", IDM_CRASH_PROCESS
MENUITEM "Crash Render Process", IDM_CRASH_RENDER_PROCESS
END
POPUP "S&ettings"
BEGIN
MENUITEM "Blocked Domains", ID_BLOCKEDSITES
MENUITEM "Set User Agent", ID_SETTINGS_SETUSERAGENT
MENUITEM SEPARATOR
MENUITEM "Toggle JavaScript", IDM_TOGGLE_JAVASCRIPT
MENUITEM "Toggle Web Messaging", IDM_TOGGLE_WEB_MESSAGING
MENUITEM "Toggle Fullscreen allowed", IDM_TOGGLE_FULLSCREEN_ALLOWED
MENUITEM "Toggle Status Bar enabled", ID_SETTINGS_STATUS_BAR_ENABLED
MENUITEM "Toggle DevTools enabled", ID_SETTINGS_DEV_TOOLS_ENABLED
MENUITEM "Toggle Block images", ID_SETTINGS_BLOCKALLIMAGES
POPUP "JavaScript Dialogs"
BEGIN
MENUITEM "Use Default Script Dialogs", IDM_USE_DEFAULT_SCRIPT_DIALOGS
MENUITEM "Use Custom Script Dialogs", IDM_USE_CUSTOM_SCRIPT_DIALOGS
MENUITEM "Use Deferred Script Dialogs", IDM_USE_DEFERRED_SCRIPT_DIALOGS
MENUITEM "Complete Deferred Script Dialog", IDM_COMPLETE_JAVASCRIPT_DIALOG
END
MENUITEM "Toggle context menus enabled", ID_SETTINGS_CONTEXT_MENUS_ENABLED
MENUITEM "Toggle host objects allowed", ID_SETTINGS_HOST_OBJECTS_ALLOWED
MENUITEM "Toggle zoom control enabled", ID_SETTINGS_ZOOM_ENABLED
MENUITEM "Toggle built-in error page enabled", ID_SETTINGS_BUILTIN_ERROR_PAGE_ENABLED
END
POPUP "&View"
BEGIN
MENUITEM "Toggle Visibility", IDM_TOGGLE_VISIBILITY
POPUP "WebView Area"
BEGIN
MENUITEM "Get WebView Bounds", IDM_GET_WEBVIEW_BOUNDS
MENUITEM "25%", IDM_SIZE_25
MENUITEM "50%", IDM_SIZE_50
MENUITEM "75%", IDM_SIZE_75
MENUITEM "100%", IDM_SIZE_100
END
POPUP "WebView Zoom"
BEGIN
MENUITEM "Get WebView Zoom", IDM_GET_WEBVIEW_ZOOM
MENUITEM "0.5x", IDM_ZOOM_05
MENUITEM "1.0x", IDM_ZOOM_10
MENUITEM "2.0x", IDM_ZOOM_20
END
POPUP "WebView Scaling"
BEGIN
MENUITEM "Scale 0.5x" IDM_SCALE_50
MENUITEM "Scale 1.0x" IDM_SCALE_100
MENUITEM "Scale 1.25x" IDM_SCALE_125
MENUITEM "Scale 1.5x" IDM_SCALE_150
END
POPUP "WebView Transform"
BEGIN
MENUITEM "No transform" IDM_TRANSFORM_NONE
MENUITEM "Rotate 30Deg" IDM_TRANSFORM_ROTATE_30DEG
MENUITEM "Rotate 60Deg Diagonally" IDM_TRANSFORM_ROTATE_60DEG_DIAG
END
POPUP "WebView Rasterization"
BEGIN
MENUITEM "Use Monitor Scale" IDM_RASTERIZATION_SCALE_DEFAULT
MENUITEM "Raster 0.5x" IDM_RASTERIZATION_SCALE_50
MENUITEM "Raster 1.0x" IDM_RASTERIZATION_SCALE_100
MENUITEM "Raster 1.25x" IDM_RASTERIZATION_SCALE_125
MENUITEM "Raster 1.5x" IDM_RASTERIZATION_SCALE_150
END
POPUP "WebView Bounds Mode"
BEGIN
MENUITEM "Raw Pixels" IDM_BOUNDS_MODE_RAW_PIXELS
MENUITEM "View Pixels" IDM_BOUNDS_MODE_VIEW_PIXELS
END
MENUITEM "Toggle Cursor Handling" IDM_TOGGLE_CURSOR_HANDLING
MENUITEM "Set Focus", IDM_FOCUS_SET
MENUITEM "Tab In", IDM_FOCUS_TAB_IN
MENUITEM "Reverse Tab In", IDM_FOCUS_REVERSE_TAB_IN
MENUITEM "Toggle Tab Handling", IDM_TOGGLE_TAB_HANDLING
END
POPUP "S&cenario"
BEGIN
MENUITEM "Web Messaging", IDM_SCENARIO_POST_WEB_MESSAGE
MENUITEM "Host Objects", IDM_SCENARIO_ADD_HOST_OBJECT
MENUITEM "Event Monitor", IDM_SCENARIO_WEB_VIEW_EVENT_MONITOR
POPUP "Script Debugging"
BEGIN
MENUITEM "JavaScript", IDM_SCENARIO_JAVA_SCRIPT
MENUITEM "TypeScript", IDM_SCENARIO_TYPE_SCRIPT
END
MENUITEM "Authentication", IDM_SCENARIO_AUTHENTICATION
MENUITEM "Cookie Management", IDM_SCENARIO_COOKIE_MANAGEMENT
MENUITEM "DOM Content Loaded", IDM_SCENARIO_DOM_CONTENT_LOADED
MENUITEM "NavigateWithWebResourceRequest", IDM_SCENARIO_NAVIGATEWITHWEBRESOURCEREQUEST
END
POPUP "&Help"
BEGIN
MENUITEM "&About ...", IDM_ABOUT
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
//
IDC_WEBVIEW2APISAMPLE ACCELERATORS
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
END
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOGEX 0, 0, 170, 62
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About WebView2APISample"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,14,14,21,20
LTEXT "WebView2APISample, Version 1.0",IDC_STATIC,42,14,114,8,SS_NOPREFIX
LTEXT "Copyright (C) 2019",IDC_STATIC,42,26,114,8
DEFPUSHBUTTON "OK",IDOK,113,41,50,14,WS_GROUP
END
IDD_DIALOG_INPUT DIALOGEX 0, 0, 309, 151
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Input"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
GROUPBOX "Static",IDC_STATIC_LABEL,7,7,295,121
EDITTEXT IDC_EDIT_INPUT,14,55,281,69,ES_MULTILINE | ES_AUTOHSCROLL
DEFPUSHBUTTON "OK",IDOK,198,130,50,14
PUSHBUTTON "Cancel",IDCANCEL,252,130,50,14
EDITTEXT IDC_EDIT_DESCRIPTION,14,18,281,33,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 163
TOPMARGIN, 7
BOTTOMMARGIN, 55
END
IDD_DIALOG_INPUT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 302
TOPMARGIN, 7
BOTTOMMARGIN, 144
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#ifndef APSTUDIO_INVOKED\r\n"
"#include ""targetver.h""\r\n"
"#endif\r\n"
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_APP_TITLE "WebView2APISample"
IDC_WEBVIEW2APISAMPLE "WEBVIEW2APISAMPLE"
END
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED