4 #pragma GCC system_header
13 #define RICHEDIT_CLASS L"RichEdit20W"
15 #define RICHEDIT_CLASS "RichEdit20A"
17 #define RICHEDIT_CLASS10A "RICHEDIT"
18 #define CF_RTF TEXT("Rich Text Format")
19 #define CF_RTFNOOBJS TEXT("Rich Text Format Without Objects")
20 #define CF_RETEXTOBJ TEXT("RichEdit Text and Objects")
23 #define CFM_UNDERLINE 4
24 #define CFM_STRIKEOUT 8
25 #define CFM_PROTECTED 16
27 #define CFM_SIZE 0x80000000
28 #define CFM_COLOR 0x40000000
29 #define CFM_FACE 0x20000000
30 #define CFM_OFFSET 0x10000000
31 #define CFM_CHARSET 0x08000000
32 #define CFM_SUBSCRIPT 0x00030000
33 #define CFM_SUPERSCRIPT 0x00030000
34 #define CFM_EFFECTS (CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_COLOR | CFM_STRIKEOUT | CFE_PROTECTED | CFM_LINK)
37 #define CFE_UNDERLINE 4
38 #define CFE_STRIKEOUT 8
39 #define CFE_PROTECTED 16
40 #define CFE_AUTOCOLOR 0x40000000
41 #define CFE_SUBSCRIPT 0x00010000
42 #define CFE_SUPERSCRIPT 0x00020000
43 #define IMF_FORCENONE 1
44 #define IMF_FORCEENABLE 2
45 #define IMF_FORCEDISABLE 4
46 #define IMF_CLOSESTATUSWINDOW 8
47 #define IMF_VERTICAL 32
48 #define IMF_FORCEACTIVE 64
49 #define IMF_FORCEINACTIVE 128
50 #define IMF_FORCEREMEMBER 256
54 #define SEL_MULTICHAR 4
55 #define SEL_MULTIOBJECT 8
56 #define MAX_TAB_STOPS 32
57 #define PFM_ALIGNMENT 8
58 #define PFM_NUMBERING 32
60 #define PFM_OFFSETINDENT 0x80000000
61 #define PFM_RIGHTINDENT 2
62 #define PFM_STARTINDENT 1
63 #define PFM_TABSTOPS 16
64 #define PFM_BORDER 2048
65 #define PFM_LINESPACING 256
66 #define PFM_NUMBERINGSTART 32768
67 #define PFM_NUMBERINGSTYLE 8192
68 #define PFM_NUMBERINGTAB 16384
69 #define PFM_SHADING 4096
70 #define PFM_SPACEAFTER 128
71 #define PFM_SPACEBEFORE 64
72 #define PFM_STYLE 1024
73 #define PFM_DONOTHYPHEN 4194304
74 #define PFM_KEEP 131072
75 #define PFM_KEEPNEXT 262144
76 #define PFM_NOLINENUMBER 1048576
77 #define PFM_NOWIDOWCONTROL 2097152
78 #define PFM_PAGEBREAKBEFORE 524288
79 #define PFM_RTLPARA 65536
80 #define PFM_SIDEBYSIDE 8388608
81 #define PFM_TABLE 1073741824
83 #define PFE_DONOTHYPHEN 64
85 #define PFE_KEEPNEXT 4
86 #define PFE_NOLINENUMBER 16
87 #define PFE_NOWIDOWCONTROL 32
88 #define PFE_PAGEBREAKBEFORE 8
90 #define PFE_SIDEBYSIDE 128
91 #define PFE_TABLE 16384
96 #define PFA_FULL_INTERWORD 4
99 #define SF_RTFNOOBJS 3
100 #define SF_TEXTIZED 4
101 #define SF_UNICODE 16
102 #define SF_USECODEPAGE 32
103 #define SF_NCRFORNONASCII 64
104 #define SF_RTFVAL 0x0700
105 #define SFF_PWD 0x0800
106 #define SFF_KEEPDOCINFO 0x1000
107 #define SFF_PERSISTVIEWSCALE 0x2000
108 #define SFF_PLAINRTF 0x4000
109 #define SFF_SELECTION 0x8000
110 #define WB_CLASSIFY 3
111 #define WB_MOVEWORDLEFT 4
112 #define WB_MOVEWORDRIGHT 5
113 #define WB_LEFTBREAK 6
114 #define WB_RIGHTBREAK 7
115 #define WB_MOVEWORDPREV 4
116 #define WB_MOVEWORDNEXT 5
117 #define WB_PREVBREAK 6
118 #define WB_NEXTBREAK 7
119 #define WBF_WORDWRAP 16
120 #define WBF_WORDBREAK 32
121 #define WBF_OVERFLOW 64
122 #define WBF_LEVEL1 128
123 #define WBF_LEVEL2 256
124 #define WBF_CUSTOM 512
125 #define ES_DISABLENOSCROLL 8192
126 #define ES_EX_NOCALLOLEINIT 16777216
127 #define ES_NOIME 524288
128 #define ES_NOOLEDRAGDROP 8
129 #define ES_SAVESEL 32768
130 #define ES_SELECTIONBAR 16777216
131 #define ES_SELFIME 262144
132 #define ES_SUNKEN 16384
133 #define ES_VERTICAL 4194304
134 #define EM_CANPASTE (WM_USER+50)
135 #define EM_DISPLAYBAND (WM_USER+51)
136 #define EM_EXGETSEL (WM_USER+52)
137 #define EM_EXLIMITTEXT (WM_USER+53)
138 #define EM_EXLINEFROMCHAR (WM_USER+54)
139 #define EM_EXSETSEL (WM_USER+55)
140 #define EM_FINDTEXT (WM_USER+56)
141 #define EM_FORMATRANGE (WM_USER+57)
142 #define EM_GETCHARFORMAT (WM_USER+58)
143 #define EM_GETEVENTMASK (WM_USER+59)
144 #define EM_GETOLEINTERFACE (WM_USER+60)
145 #define EM_GETPARAFORMAT (WM_USER+61)
146 #define EM_GETSELTEXT (WM_USER+62)
147 #define EM_HIDESELECTION (WM_USER+63)
148 #define EM_PASTESPECIAL (WM_USER+64)
149 #define EM_REQUESTRESIZE (WM_USER+65)
150 #define EM_SELECTIONTYPE (WM_USER+66)
151 #define EM_SETBKGNDCOLOR (WM_USER+67)
152 #define EM_SETCHARFORMAT (WM_USER+68)
153 #define EM_SETEVENTMASK (WM_USER+69)
154 #define EM_SETOLECALLBACK (WM_USER+70)
155 #define EM_SETPARAFORMAT (WM_USER+71)
156 #define EM_SETTARGETDEVICE (WM_USER+72)
157 #define EM_STREAMIN (WM_USER+73)
158 #define EM_STREAMOUT (WM_USER+74)
159 #define EM_GETTEXTRANGE (WM_USER+75)
160 #define EM_FINDWORDBREAK (WM_USER+76)
161 #define EM_SETOPTIONS (WM_USER+77)
162 #define EM_GETOPTIONS (WM_USER+78)
163 #define EM_FINDTEXTEX (WM_USER+79)
164 #define EM_GETWORDBREAKPROCEX (WM_USER+80)
165 #define EM_SETWORDBREAKPROCEX (WM_USER+81)
166 /* RichEdit 2.0 messages */
167 #define EM_SETUNDOLIMIT (WM_USER+82)
168 #define EM_REDO (WM_USER+84)
169 #define EM_CANREDO (WM_USER+85)
170 #define EM_GETUNDONAME (WM_USER+86)
171 #define EM_GETREDONAME (WM_USER+87)
172 #define EM_STOPGROUPTYPING (WM_USER+88)
173 #define EM_SETTEXTMODE (WM_USER+89)
174 #define EM_GETTEXTMODE (WM_USER+90)
175 #define EM_AUTOURLDETECT (WM_USER+91)
176 #define EM_GETAUTOURLDETECT (WM_USER + 92)
177 #define EM_SETPALETTE (WM_USER + 93)
178 #define EM_GETTEXTEX (WM_USER+94)
179 #define EM_GETTEXTLENGTHEX (WM_USER+95)
180 #define EM_SHOWSCROLLBAR (WM_USER+96)
181 #define EM_SETTEXTEX (WM_USER + 97)
182 #define EM_SETPUNCTUATION (WM_USER + 100)
183 #define EM_GETPUNCTUATION (WM_USER + 101)
184 #define EM_SETWORDWRAPMODE (WM_USER + 102)
185 #define EM_GETWORDWRAPMODE (WM_USER + 103)
186 #define EM_SETIMECOLOR (WM_USER + 104)
187 #define EM_GETIMECOLOR (WM_USER + 105)
188 #define EM_SETIMEOPTIONS (WM_USER + 106)
189 #define EM_GETIMEOPTIONS (WM_USER + 107)
190 #define EM_SETLANGOPTIONS (WM_USER+120)
191 #define EM_GETLANGOPTIONS (WM_USER+121)
192 #define EM_GETIMECOMPMODE (WM_USER+122)
193 #define EM_FINDTEXTW (WM_USER + 123)
194 #define EM_FINDTEXTEXW (WM_USER + 124)
195 #define EM_RECONVERSION (WM_USER + 125)
196 #define EM_SETBIDIOPTIONS (WM_USER + 200)
197 #define EM_GETBIDIOPTIONS (WM_USER + 201)
198 #define EM_SETTYPOGRAPHYOPTIONS (WM_USER+202)
199 #define EM_GETTYPOGRAPHYOPTIONS (WM_USER+203)
200 #define EM_SETEDITSTYLE (WM_USER + 204)
201 #define EM_GETEDITSTYLE (WM_USER + 205)
202 #define EM_GETSCROLLPOS (WM_USER+221)
203 #define EM_SETSCROLLPOS (WM_USER+222)
204 #define EM_SETFONTSIZE (WM_USER+223)
205 #define EM_GETZOOM (WM_USER+224)
206 #define EM_SETZOOM (WM_USER+225)
208 #define EN_CORRECTTEXT 1797
209 #define EN_DROPFILES 1795
210 #define EN_IMECHANGE 1799
212 #define EN_MSGFILTER 1792
213 #define EN_OLEOPFAILED 1801
214 #define EN_PROTECTED 1796
215 #define EN_REQUESTRESIZE 1793
216 #define EN_SAVECLIPBOARD 1800
217 #define EN_SELCHANGE 1794
218 #define EN_STOPNOUNDO 1798
221 #define ENM_CORRECTTEXT 4194304
222 #define ENM_DRAGDROPDONE 16
223 #define ENM_DROPFILES 1048576
224 #define ENM_IMECHANGE 8388608
225 #define ENM_KEYEVENTS 65536
226 #define ENM_LANGCHANGE 16777216
227 #define ENM_LINK 67108864
228 #define ENM_MOUSEEVENTS 131072
229 #define ENM_OBJECTPOSITIONS 33554432
230 #define ENM_PROTECTED 2097152
231 #define ENM_REQUESTRESIZE 262144
233 #define ENM_SCROLLEVENTS 8
234 #define ENM_SELCHANGE 524288
236 #define ECO_AUTOWORDSELECTION 1
237 #define ECO_AUTOVSCROLL 64
238 #define ECO_AUTOHSCROLL 128
239 #define ECO_NOHIDESEL 256
240 #define ECO_READONLY 2048
241 #define ECO_WANTRETURN 4096
242 #define ECO_SAVESEL 0x8000
243 #define ECO_SELECTIONBAR 0x1000000
244 #define ECO_VERTICAL 0x400000
249 #define SCF_DEFAULT 0
250 #define SCF_SELECTION 1
253 #define SCF_USEUIRULES 8
254 #define TM_PLAINTEXT 1
255 #define TM_RICHTEXT 2
256 #define TM_SINGLELEVELUNDO 4
257 #define TM_MULTILEVELUNDO 8
258 #define TM_SINGLECODEPAGE 16
259 #define TM_MULTICODEPAGE 32
260 #define yHeightCharPtsMost 1638
261 #define lDefaultTab 720
263 typedef struct _charformat
{
269 COLORREF crTextColor
;
271 BYTE bPitchAndFamily
;
272 char szFaceName
[LF_FACESIZE
];
274 typedef struct _charformatw
{
280 COLORREF crTextColor
;
282 BYTE bPitchAndFamily
;
283 WCHAR szFaceName
[LF_FACESIZE
];
285 typedef struct _charformat2a
{
291 COLORREF crTextColor
;
293 BYTE bPitchAndFamily
;
294 char szFaceName
[LF_FACESIZE
];
297 COLORREF crBackColor
;
306 typedef struct _charformat2w
{
312 COLORREF crTextColor
;
314 BYTE bPitchAndFamily
;
315 WCHAR szFaceName
[LF_FACESIZE
];
318 COLORREF crBackColor
;
327 typedef struct _charrange
{
331 typedef struct _compcolor
{
333 COLORREF crBackground
;
336 typedef DWORD(CALLBACK
*EDITSTREAMCALLBACK
)(DWORD
,PBYTE
,LONG
,LONG
*);
337 typedef struct _editstream
{
340 EDITSTREAMCALLBACK pfnCallback
;
342 typedef struct _encorrecttext
{
347 typedef struct _endropfiles
{
353 typedef struct _enlink
{
366 typedef struct _enprotected
{
372 } ENPROTECTED
,*LPENPROTECTED
;
373 typedef struct _ensaveclipboard
{
378 typedef struct _findtextA
{
382 typedef struct _findtextW
{
386 typedef struct _findtextexA
{
391 typedef struct _findtextexW
{
396 typedef struct _formatrange
{
403 typedef struct _msgfilter
{
409 typedef struct _paraformat
{
419 LONG rgxTabs
[MAX_TAB_STOPS
];
421 typedef struct _paraformat2
{
431 LONG rgxTabs
[MAX_TAB_STOPS
];
436 BYTE bLineSpacingRule
;
440 WORD wNumberingStart
;
441 WORD wNumberingStyle
;
447 typedef struct _selchange
{
452 typedef struct _textrange
{
456 typedef struct _textrangew
{
460 typedef struct _reqresize
{
464 typedef struct _repastespecial
{
468 typedef struct _punctuation
{
472 typedef struct _gettextex
{
476 LPCSTR lpDefaultChar
;
477 LPBOOL lpUsedDefChar
;
479 /* GETTEXTEX flags */
482 #define GT_SELECTION 2
483 typedef struct _settextex
{
487 /* SETTEXTEX flags */
489 #define ST_KEEPUNDO 1
490 #define ST_SELECTION 2
491 typedef LONG (*EDITWORDBREAKPROCEX
)(char*,LONG
,BYTE
,INT
);
492 /* Defines for EM_SETTYPOGRAPHYOPTIONS */
493 #define TO_ADVANCEDTYPOGRAPHY 1
494 #define TO_SIMPLELINEBREAK 2
495 /* Defines for GETTEXTLENGTHEX */
496 #define GTL_DEFAULT 0
497 #define GTL_USECRLF 1
498 #define GTL_PRECISE 2
500 #define GTL_NUMCHARS 8
501 #define GTL_NUMBYTES 16
502 typedef struct _gettextlengthex
{
507 typedef CHARFORMATW CHARFORMAT
;
508 typedef CHARFORMAT2W CHARFORMAT2
;
509 typedef FINDTEXTW FINDTEXT
;
510 typedef FINDTEXTEXW FINDTEXTEX
;
511 typedef TEXTRANGEW TEXTRANGE
;
513 typedef CHARFORMATA CHARFORMAT
;
514 typedef CHARFORMAT2A CHARFORMAT2
;
515 typedef FINDTEXTA FINDTEXT
;
516 typedef FINDTEXTEXA FINDTEXTEX
;
517 typedef TEXTRANGEA TEXTRANGE
;