mfplat: Fix asynchronous object creation from URL.
[wine/zf.git] / programs / wordpad / wordpad.h
blob0baf8c924dd67050e8502472a69491afaf5d4b41
1 /*
2 * Copyright 2004 by Krzysztof Foltman
3 * Copyright 2007-2008 by Alexander N. Sørnes <alex@thehandofagony.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include <windef.h>
21 #include <winuser.h>
23 #define MAX_STRING_LEN 255
25 #define TWIPS_PER_INCH 1440
26 #define CENTMM_PER_INCH 2540
28 #define ID_FILE_EXIT 1000
29 #define ID_FILE_OPEN 1001
30 #define ID_FILE_SAVE 1002
31 #define ID_FILE_NEW 1003
32 #define ID_FILE_SAVEAS 1004
34 #define ID_FILE_RECENT1 1005
35 #define ID_FILE_RECENT2 1006
36 #define ID_FILE_RECENT3 1007
37 #define ID_FILE_RECENT4 1008
38 #define ID_FILE_RECENT_SEPARATOR 1009
40 #define ID_PRINT 1010
41 #define ID_PREVIEW 1011
42 #define ID_PRINTSETUP 1012
43 #define ID_PRINT_QUICK 1013
45 #define ID_FIND 1014
46 #define ID_FIND_NEXT 1015
47 #define ID_REPLACE 1016
49 #define ID_PREVIEW_NEXTPAGE 1017
50 #define ID_PREVIEW_PREVPAGE 1018
51 #define ID_PREVIEW_NUMPAGES 1019
52 #define ID_PREVIEW_ZOOMIN 1020
53 #define ID_PREVIEW_ZOOMOUT 1021
55 #define ID_ALIGN_LEFT 1100
56 #define ID_ALIGN_CENTER 1101
57 #define ID_ALIGN_RIGHT 1102
59 #define ID_BACK_1 1200
60 #define ID_BACK_2 1201
62 #define ID_EDIT_SELECTALL 1300
63 #define ID_EDIT_SELECTIONINFO 1301
64 #define ID_EDIT_READONLY 1302
65 #define ID_EDIT_MODIFIED 1303
66 #define ID_EDIT_CHARFORMAT 1304
67 #define ID_EDIT_PARAFORMAT 1305
68 #define ID_EDIT_DEFCHARFORMAT 1306
69 #define ID_EDIT_UNDO 1307
70 #define ID_EDIT_REDO 1308
71 #define ID_EDIT_GETTEXT 1309
72 #define ID_EDIT_COPY 1310
73 #define ID_EDIT_CUT 1311
74 #define ID_EDIT_PASTE 1312
75 #define ID_EDIT_CLEAR 1313
76 #define ID_BULLETONOFF 1314
77 #define ID_BULLET 1315
78 #define ID_NUMBERING 1316
79 #define ID_LCLETTER 1317
80 #define ID_UCLETTER 1318
81 #define ID_LCROMAN 1319
82 #define ID_UCROMAN 1320
83 #define ID_LISTMENU 1325
85 #define ID_FONTSETTINGS 1330
87 #define ID_FORMAT_BOLD 1400
88 #define ID_FORMAT_ITALIC 1401
89 #define ID_FORMAT_UNDERLINE 1402
90 #define ID_FORMAT_COLOR 1403
92 #define ID_TOGGLE_TOOLBAR 1500
93 #define ID_TOGGLE_FORMATBAR 1501
94 #define ID_TOGGLE_STATUSBAR 1502
95 #define ID_TOGGLE_RULER 1503
97 #define PREVIEW_BUTTONS 7
99 #define FILELIST_ENTRIES 4
100 #define FILELIST_ENTRY_LENGTH 33
102 #define BANDID_TOOLBAR 2
103 #define BANDID_FORMATBAR 3
104 #define BANDID_RULER 0
105 #define BANDID_STATUSBAR 1
106 #define BANDID_FONTLIST 4
107 #define BANDID_SIZELIST 5
109 #define BANDID_PREVIEW_BTN1 6
110 #define BANDID_PREVIEW_BTN2 7
111 #define BANDID_PREVIEW_BTN3 8
112 #define BANDID_PREVIEW_BTN4 9
113 #define BANDID_PREVIEW_BTN5 10
114 #define BANDID_PREVIEW_BTN6 11
115 #define BANDID_PREVIEW_BTN7 12
116 #define BANDID_PREVIEW_BUFFER 13
118 #define ID_WORDWRAP_NONE 0
119 #define ID_WORDWRAP_WINDOW 1
120 #define ID_WORDWRAP_MARGIN 2
122 #define ID_NEWFILE_ABORT 100
124 #define ID_TAB_ADD 100
125 #define ID_TAB_DEL 101
126 #define ID_TAB_EMPTY 102
128 #define IDC_PAGEFMT_TB 100
129 #define IDC_PAGEFMT_FB 101
130 #define IDC_PAGEFMT_RU 102
131 #define IDC_PAGEFMT_SB 103
132 #define IDC_PAGEFMT_WN 104
133 #define IDC_PAGEFMT_WW 105
134 #define IDC_PAGEFMT_WM 106
135 #define IDC_PAGEFMT_ID 107
137 #define ID_DATETIME 1600
138 #define ID_PARAFORMAT 1601
139 #define ID_TABSTOPS 1602
141 #define ID_ABOUT 1603
142 #define ID_VIEWPROPERTIES 1604
144 #define ID_COLOR_FIRST 1800
145 #define ID_COLOR_BLACK 1800
146 #define ID_COLOR_MAROON 1801
147 #define ID_COLOR_GREEN 1802
148 #define ID_COLOR_OLIVE 1803
149 #define ID_COLOR_NAVY 1804
150 #define ID_COLOR_PURPLE 1805
151 #define ID_COLOR_TEAL 1806
152 #define ID_COLOR_GRAY 1807
153 #define ID_COLOR_SILVER 1808
154 #define ID_COLOR_RED 1809
155 #define ID_COLOR_LIME 1810
156 #define ID_COLOR_YELLOW 1811
157 #define ID_COLOR_BLUE 1812
158 #define ID_COLOR_FUCHSIA 1813
159 #define ID_COLOR_AQUA 1814
160 #define ID_COLOR_WHITE 1815
161 #define ID_COLOR_AUTOMATIC 1816
163 #define IDC_STATUSBAR 2000
164 #define IDC_EDITOR 2001
165 #define IDC_TOOLBAR 2002
166 #define IDC_FORMATBAR 2003
167 #define IDC_REBAR 2004
168 #define IDC_COMBO 2005
169 #define IDC_DATETIME 2006
170 #define IDC_NEWFILE 2007
171 #define IDC_PARA_LEFT 2008
172 #define IDC_PARA_RIGHT 2009
173 #define IDC_PARA_FIRST 2010
174 #define IDC_PARA_ALIGN 2011
175 #define IDC_TABSTOPS 2012
176 #define IDC_FONTLIST 2013
177 #define IDC_SIZELIST 2014
178 #define IDC_RULER 2015
179 #define IDC_PREVIEW 2016
181 #define IDD_DATETIME 2100
182 #define IDD_NEWFILE 2101
183 #define IDD_PARAFORMAT 2102
184 #define IDD_TABSTOPS 2103
185 #define IDD_FORMATOPTS 2104
187 #define IDM_MAINMENU 2200
188 #define IDM_POPUP 2201
189 #define IDM_COLOR_POPUP 2202
191 #define IDB_TOOLBAR 100
192 #define IDB_FORMATBAR 101
194 #define IDI_WORDPAD 102
196 #define IDC_ZOOM 103
198 #define STRING_ALL_FILES 1400
199 #define STRING_TEXT_FILES_TXT 1401
200 #define STRING_TEXT_FILES_UNICODE_TXT 1402
201 #define STRING_RICHTEXT_FILES_RTF 1403
203 #define STRING_NEWFILE_RICHTEXT 1404
204 #define STRING_NEWFILE_TXT 1405
205 #define STRING_NEWFILE_TXT_UNICODE 1406
207 #define STRING_PRINTER_FILES_PRN 1407
209 #define STRING_ALIGN_LEFT 1416
210 #define STRING_ALIGN_RIGHT 1417
211 #define STRING_ALIGN_CENTER 1418
213 #define STRING_VIEWPROPS_TITLE 1432
214 #define STRING_VIEWPROPS_TEXT 1433
215 #define STRING_VIEWPROPS_RICHTEXT 1434
217 #define STRING_PREVIEW_PRINT 1448
218 #define STRING_PREVIEW_NEXTPAGE 1449
219 #define STRING_PREVIEW_PREVPAGE 1450
220 #define STRING_PREVIEW_TWOPAGES 1451
221 #define STRING_PREVIEW_ONEPAGE 1452
222 #define STRING_PREVIEW_ZOOMIN 1453
223 #define STRING_PREVIEW_ZOOMOUT 1454
224 #define STRING_PREVIEW_CLOSE 1455
225 #define STRING_PREVIEW_PAGE 1456
226 #define STRING_PREVIEW_PAGES 1457
228 #define STRING_UNITS_CM 1458
229 #define STRING_UNITS_IN 1459
230 #define STRING_UNITS_INCH 1460
231 #define STRING_UNITS_PT 1461
233 #define STRING_DEFAULT_FILENAME 1700
234 #define STRING_PROMPT_SAVE_CHANGES 1701
235 #define STRING_SEARCH_FINISHED 1702
236 #define STRING_LOAD_RICHED_FAILED 1703
237 #define STRING_SAVE_LOSEFORMATTING 1704
238 #define STRING_INVALID_NUMBER 1705
239 #define STRING_OLE_STORAGE_NOT_SUPPORTED 1706
240 #define STRING_WRITE_FAILED 1707
241 #define STRING_WRITE_ACCESS_DENIED 1708
242 #define STRING_OPEN_FAILED 1709
243 #define STRING_OPEN_ACCESS_DENIED 1710
244 #define STRING_PRINTING_NOT_IMPLEMENTED 1711
245 #define STRING_MAX_TAB_STOPS 1712
247 /* wordpad.c */
248 LPWSTR file_basename(LPWSTR);
250 /* print.c */
251 void dialog_printsetup(HWND);
252 void dialog_print(HWND, LPWSTR);
253 void target_device(HWND, DWORD);
254 void print_quick(HWND, LPWSTR);
255 LRESULT preview_command(HWND, WPARAM);
256 void init_preview(HWND, LPWSTR);
257 void close_preview(HWND);
258 BOOL preview_isactive(void);
259 void get_default_printer_opts(void);
260 void registry_set_pagemargins(HKEY);
261 void registry_read_pagemargins(HKEY);
262 void registry_set_previewpages(HKEY hKey);
263 void registry_read_previewpages(HKEY hKey);
264 LRESULT CALLBACK ruler_proc(HWND, UINT, WPARAM, LPARAM);
265 void redraw_ruler(HWND);
267 /* registry.c */
268 int reg_formatindex(WPARAM);
269 void registry_read_filelist(HWND);
270 void registry_read_options(void);
271 void registry_read_formatopts_all(DWORD[], DWORD[]);
272 void registry_read_winrect(RECT*);
273 void registry_read_maximized(DWORD*);
274 void registry_set_filelist(LPCWSTR, HWND);
275 void registry_set_formatopts_all(DWORD[], DWORD[]);
276 void registry_set_options(HWND);
278 /* olecallback.c */
279 HRESULT setup_richedit_olecallback(HWND hEditorWnd);