1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _RICHEDIT_ 7 #define _RICHEDIT_ 8 9 #include <_mingw_unicode.h> 10 #include <pshpack4.h> 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 #ifndef _RICHEDIT_VER 17 #define _RICHEDIT_VER 0x0300 18 #endif 19 20 #define cchTextLimitDefault 32767 21 22 #define MSFTEDIT_CLASS L"RICHEDIT50W" 23 24 #define CERICHEDIT_CLASSA "RichEditCEA" 25 #define CERICHEDIT_CLASSW L"RichEditCEW" 26 27 #define RICHEDIT_CLASSA "RichEdit20A" 28 #define RICHEDIT_CLASS10A "RICHEDIT" 29 30 #define RICHEDIT_CLASSW L"RichEdit20W" 31 32 #if (_RICHEDIT_VER >= 0x0200) 33 #define RICHEDIT_CLASS __MINGW_NAME_AW(RICHEDIT_CLASS) 34 #else 35 #define RICHEDIT_CLASS RICHEDIT_CLASS10A 36 #endif 37 38 #ifndef WM_CONTEXTMENU 39 #define WM_CONTEXTMENU 0x007B 40 #endif 41 42 #ifndef WM_UNICHAR 43 #define WM_UNICHAR 0x0109 44 #endif 45 46 #ifndef WM_PRINTCLIENT 47 #define WM_PRINTCLIENT 0x0318 48 #endif 49 50 #ifndef EM_GETLIMITTEXT 51 #define EM_GETLIMITTEXT (WM_USER + 37) 52 #endif 53 54 #ifndef EM_POSFROMCHAR 55 #define EM_POSFROMCHAR (WM_USER + 38) 56 #define EM_CHARFROMPOS (WM_USER + 39) 57 #endif 58 59 #ifndef EM_SCROLLCARET 60 #define EM_SCROLLCARET (WM_USER + 49) 61 #endif 62 #define EM_CANPASTE (WM_USER + 50) 63 #define EM_DISPLAYBAND (WM_USER + 51) 64 #define EM_EXGETSEL (WM_USER + 52) 65 #define EM_EXLIMITTEXT (WM_USER + 53) 66 #define EM_EXLINEFROMCHAR (WM_USER + 54) 67 #define EM_EXSETSEL (WM_USER + 55) 68 #define EM_FINDTEXT (WM_USER + 56) 69 #define EM_FORMATRANGE (WM_USER + 57) 70 #define EM_GETCHARFORMAT (WM_USER + 58) 71 #define EM_GETEVENTMASK (WM_USER + 59) 72 #define EM_GETOLEINTERFACE (WM_USER + 60) 73 #define EM_GETPARAFORMAT (WM_USER + 61) 74 #define EM_GETSELTEXT (WM_USER + 62) 75 #define EM_HIDESELECTION (WM_USER + 63) 76 #define EM_PASTESPECIAL (WM_USER + 64) 77 #define EM_REQUESTRESIZE (WM_USER + 65) 78 #define EM_SELECTIONTYPE (WM_USER + 66) 79 #define EM_SETBKGNDCOLOR (WM_USER + 67) 80 #define EM_SETCHARFORMAT (WM_USER + 68) 81 #define EM_SETEVENTMASK (WM_USER + 69) 82 #define EM_SETOLECALLBACK (WM_USER + 70) 83 #define EM_SETPARAFORMAT (WM_USER + 71) 84 #define EM_SETTARGETDEVICE (WM_USER + 72) 85 #define EM_STREAMIN (WM_USER + 73) 86 #define EM_STREAMOUT (WM_USER + 74) 87 #define EM_GETTEXTRANGE (WM_USER + 75) 88 #define EM_FINDWORDBREAK (WM_USER + 76) 89 #define EM_SETOPTIONS (WM_USER + 77) 90 #define EM_GETOPTIONS (WM_USER + 78) 91 #define EM_FINDTEXTEX (WM_USER + 79) 92 #define EM_GETWORDBREAKPROCEX (WM_USER + 80) 93 #define EM_SETWORDBREAKPROCEX (WM_USER + 81) 94 #define EM_SETUNDOLIMIT (WM_USER + 82) 95 #define EM_REDO (WM_USER + 84) 96 #define EM_CANREDO (WM_USER + 85) 97 #define EM_GETUNDONAME (WM_USER + 86) 98 #define EM_GETREDONAME (WM_USER + 87) 99 #define EM_STOPGROUPTYPING (WM_USER + 88) 100 101 #define EM_SETTEXTMODE (WM_USER + 89) 102 #define EM_GETTEXTMODE (WM_USER + 90) 103 104 typedef enum tagTextMode { 105 TM_PLAINTEXT = 1,TM_RICHTEXT = 2,TM_SINGLELEVELUNDO = 4,TM_MULTILEVELUNDO = 8,TM_SINGLECODEPAGE = 16,TM_MULTICODEPAGE = 32 106 } TEXTMODE; 107 108 #define EM_AUTOURLDETECT (WM_USER + 91) 109 #define EM_GETAUTOURLDETECT (WM_USER + 92) 110 #define EM_SETPALETTE (WM_USER + 93) 111 #define EM_GETTEXTEX (WM_USER + 94) 112 #define EM_GETTEXTLENGTHEX (WM_USER + 95) 113 #define EM_SHOWSCROLLBAR (WM_USER + 96) 114 #define EM_SETTEXTEX (WM_USER + 97) 115 116 #define EM_SETPUNCTUATION (WM_USER + 100) 117 #define EM_GETPUNCTUATION (WM_USER + 101) 118 #define EM_SETWORDWRAPMODE (WM_USER + 102) 119 #define EM_GETWORDWRAPMODE (WM_USER + 103) 120 #define EM_SETIMECOLOR (WM_USER + 104) 121 #define EM_GETIMECOLOR (WM_USER + 105) 122 #define EM_SETIMEOPTIONS (WM_USER + 106) 123 #define EM_GETIMEOPTIONS (WM_USER + 107) 124 #define EM_CONVPOSITION (WM_USER + 108) 125 126 #define EM_SETLANGOPTIONS (WM_USER + 120) 127 #define EM_GETLANGOPTIONS (WM_USER + 121) 128 #define EM_GETIMECOMPMODE (WM_USER + 122) 129 130 #define EM_FINDTEXTW (WM_USER + 123) 131 #define EM_FINDTEXTEXW (WM_USER + 124) 132 133 #define EM_RECONVERSION (WM_USER + 125) 134 #define EM_SETIMEMODEBIAS (WM_USER + 126) 135 #define EM_GETIMEMODEBIAS (WM_USER + 127) 136 137 #define EM_SETBIDIOPTIONS (WM_USER + 200) 138 #define EM_GETBIDIOPTIONS (WM_USER + 201) 139 140 #define EM_SETTYPOGRAPHYOPTIONS (WM_USER + 202) 141 #define EM_GETTYPOGRAPHYOPTIONS (WM_USER + 203) 142 143 #define EM_SETEDITSTYLE (WM_USER + 204) 144 #define EM_GETEDITSTYLE (WM_USER + 205) 145 146 #define SES_EMULATESYSEDIT 1 147 #define SES_BEEPONMAXTEXT 2 148 #define SES_EXTENDBACKCOLOR 4 149 #define SES_MAPCPS 8 150 #define SES_EMULATE10 16 151 #define SES_USECRLF 32 152 #define SES_USEAIMM 64 153 #define SES_NOIME 128 154 155 #define SES_ALLOWBEEPS 256 156 #define SES_UPPERCASE 512 157 #define SES_LOWERCASE 1024 158 #define SES_NOINPUTSEQUENCECHK 2048 159 #define SES_BIDI 4096 160 #define SES_SCROLLONKILLFOCUS 8192 161 #define SES_XLTCRCRLFTOCR 16384 162 #define SES_DRAFTMODE 32768 163 164 #define SES_USECTF 0x0010000 165 #define SES_HIDEGRIDLINES 0x0020000 166 #define SES_USEATFONT 0x0040000 167 #define SES_CUSTOMLOOK 0x0080000 168 #define SES_LBSCROLLNOTIFY 0x0100000 169 #define SES_CTFALLOWEMBED 0x0200000 170 #define SES_CTFALLOWSMARTTAG 0x0400000 171 #define SES_CTFALLOWPROOFING 0x0800000 172 173 #define IMF_AUTOKEYBOARD 0x0001 174 #define IMF_AUTOFONT 0x0002 175 #define IMF_IMECANCELCOMPLETE 0x0004 176 #define IMF_IMEALWAYSSENDNOTIFY 0x0008 177 #define IMF_AUTOFONTSIZEADJUST 0x0010 178 #define IMF_UIFONTS 0x0020 179 #define IMF_DUALFONT 0x0080 180 181 #define ICM_NOTOPEN 0x0000 182 #define ICM_LEVEL3 0x0001 183 #define ICM_LEVEL2 0x0002 184 #define ICM_LEVEL2_5 0x0003 185 #define ICM_LEVEL2_SUI 0x0004 186 #define ICM_CTF 0x0005 187 188 #define TO_ADVANCEDTYPOGRAPHY 1 189 #define TO_SIMPLELINEBREAK 2 190 #define TO_DISABLECUSTOMTEXTOUT 4 191 #define TO_ADVANCEDLAYOUT 8 192 193 #define EM_OUTLINE (WM_USER + 220) 194 195 #define EM_GETSCROLLPOS (WM_USER + 221) 196 #define EM_SETSCROLLPOS (WM_USER + 222) 197 198 #define EM_SETFONTSIZE (WM_USER + 223) 199 #define EM_GETZOOM (WM_USER + 224) 200 #define EM_SETZOOM (WM_USER + 225) 201 #define EM_GETVIEWKIND (WM_USER + 226) 202 #define EM_SETVIEWKIND (WM_USER + 227) 203 204 #define EM_GETPAGE (WM_USER + 228) 205 #define EM_SETPAGE (WM_USER + 229) 206 #define EM_GETHYPHENATEINFO (WM_USER + 230) 207 #define EM_SETHYPHENATEINFO (WM_USER + 231) 208 #define EM_GETPAGEROTATE (WM_USER + 235) 209 #define EM_SETPAGEROTATE (WM_USER + 236) 210 #define EM_GETCTFMODEBIAS (WM_USER + 237) 211 #define EM_SETCTFMODEBIAS (WM_USER + 238) 212 #define EM_GETCTFOPENSTATUS (WM_USER + 240) 213 #define EM_SETCTFOPENSTATUS (WM_USER + 241) 214 #define EM_GETIMECOMPTEXT (WM_USER + 242) 215 #define EM_ISIME (WM_USER + 243) 216 #define EM_GETIMEPROPERTY (WM_USER + 244) 217 218 #define EM_GETQUERYRTFOBJ (WM_USER + 269) 219 #define EM_SETQUERYRTFOBJ (WM_USER + 270) 220 221 #define EPR_0 0 222 #define EPR_270 1 223 #define EPR_180 2 224 #define EPR_90 3 225 226 #define CTFMODEBIAS_DEFAULT 0x0000 227 #define CTFMODEBIAS_FILENAME 0x0001 228 #define CTFMODEBIAS_NAME 0x0002 229 #define CTFMODEBIAS_READING 0x0003 230 #define CTFMODEBIAS_DATETIME 0x0004 231 #define CTFMODEBIAS_CONVERSATION 0x0005 232 #define CTFMODEBIAS_NUMERIC 0x0006 233 #define CTFMODEBIAS_HIRAGANA 0x0007 234 #define CTFMODEBIAS_KATAKANA 0x0008 235 #define CTFMODEBIAS_HANGUL 0x0009 236 #define CTFMODEBIAS_HALFWIDTHKATAKANA 0x000A 237 #define CTFMODEBIAS_FULLWIDTHALPHANUMERIC 0x000B 238 #define CTFMODEBIAS_HALFWIDTHALPHANUMERIC 0x000C 239 240 #define IMF_SMODE_PLAURALCLAUSE 0x0001 241 #define IMF_SMODE_NONE 0x0002 242 243 typedef struct _imecomptext { 244 LONG cb; 245 DWORD flags; 246 } IMECOMPTEXT; 247 248 #define ICT_RESULTREADSTR 1 249 250 #define EMO_EXIT 0 251 #define EMO_ENTER 1 252 #define EMO_PROMOTE 2 253 #define EMO_EXPAND 3 254 #define EMO_MOVESELECTION 4 255 #define EMO_GETVIEWMODE 5 256 257 #define EMO_EXPANDSELECTION 0 258 #define EMO_EXPANDDOCUMENT 1 259 260 #define VM_NORMAL 4 261 #define VM_OUTLINE 2 262 #define VM_PAGE 9 263 264 #define EN_MSGFILTER 0x0700 265 #define EN_REQUESTRESIZE 0x0701 266 #define EN_SELCHANGE 0x0702 267 #define EN_DROPFILES 0x0703 268 #define EN_PROTECTED 0x0704 269 #define EN_CORRECTTEXT 0x0705 270 #define EN_STOPNOUNDO 0x0706 271 #define EN_IMECHANGE 0x0707 272 #define EN_SAVECLIPBOARD 0x0708 273 #define EN_OLEOPFAILED 0x0709 274 #define EN_OBJECTPOSITIONS 0x070a 275 #define EN_LINK 0x070b 276 #define EN_DRAGDROPDONE 0x070c 277 #define EN_PARAGRAPHEXPANDED 0x070d 278 #define EN_PAGECHANGE 0x070e 279 #define EN_LOWFIRTF 0x070f 280 #define EN_ALIGNLTR 0x0710 281 #define EN_ALIGNRTL 0x0711 282 283 #define ENM_NONE 0x00000000 284 #define ENM_CHANGE 0x00000001 285 #define ENM_UPDATE 0x00000002 286 #define ENM_SCROLL 0x00000004 287 #define ENM_SCROLLEVENTS 0x00000008 288 #define ENM_DRAGDROPDONE 0x00000010 289 #define ENM_PARAGRAPHEXPANDED 0x00000020 290 #define ENM_PAGECHANGE 0x00000040 291 #define ENM_KEYEVENTS 0x00010000 292 #define ENM_MOUSEEVENTS 0x00020000 293 #define ENM_REQUESTRESIZE 0x00040000 294 #define ENM_SELCHANGE 0x00080000 295 #define ENM_DROPFILES 0x00100000 296 #define ENM_PROTECTED 0x00200000 297 #define ENM_CORRECTTEXT 0x00400000 298 #define ENM_IMECHANGE 0x00800000 299 #define ENM_LANGCHANGE 0x01000000 300 #define ENM_OBJECTPOSITIONS 0x02000000 301 #define ENM_LINK 0x04000000 302 #define ENM_LOWFIRTF 0x08000000 303 304 #define ES_SAVESEL 0x00008000 305 #define ES_SUNKEN 0x00004000 306 #define ES_DISABLENOSCROLL 0x00002000 307 #define ES_SELECTIONBAR 0x01000000 308 #define ES_NOOLEDRAGDROP 0x00000008 309 #define ES_EX_NOCALLOLEINIT 0x00000000 310 #define ES_VERTICAL 0x00400000 311 #define ES_NOIME 0x00080000 312 #define ES_SELFIME 0x00040000 313 314 #define ECO_AUTOWORDSELECTION 0x00000001 315 #define ECO_AUTOVSCROLL 0x00000040 316 #define ECO_AUTOHSCROLL 0x00000080 317 #define ECO_NOHIDESEL 0x00000100 318 #define ECO_READONLY 0x00000800 319 #define ECO_WANTRETURN 0x00001000 320 #define ECO_SAVESEL 0x00008000 321 #define ECO_SELECTIONBAR 0x01000000 322 #define ECO_VERTICAL 0x00400000 323 324 #define ECOOP_SET 0x0001 325 #define ECOOP_OR 0x0002 326 #define ECOOP_AND 0x0003 327 #define ECOOP_XOR 0x0004 328 329 #define WB_CLASSIFY 3 330 #define WB_MOVEWORDLEFT 4 331 #define WB_MOVEWORDRIGHT 5 332 #define WB_LEFTBREAK 6 333 #define WB_RIGHTBREAK 7 334 335 #define WB_MOVEWORDPREV 4 336 #define WB_MOVEWORDNEXT 5 337 #define WB_PREVBREAK 6 338 #define WB_NEXTBREAK 7 339 340 #define PC_FOLLOWING 1 341 #define PC_LEADING 2 342 #define PC_OVERFLOW 3 343 #define PC_DELIMITER 4 344 #define WBF_WORDWRAP 0x010 345 #define WBF_WORDBREAK 0x020 346 #define WBF_OVERFLOW 0x040 347 #define WBF_LEVEL1 0x080 348 #define WBF_LEVEL2 0x100 349 #define WBF_CUSTOM 0x200 350 351 #define IMF_FORCENONE 0x0001 352 #define IMF_FORCEENABLE 0x0002 353 #define IMF_FORCEDISABLE 0x0004 354 #define IMF_CLOSESTATUSWINDOW 0x0008 355 #define IMF_VERTICAL 0x0020 356 #define IMF_FORCEACTIVE 0x0040 357 #define IMF_FORCEINACTIVE 0x0080 358 #define IMF_FORCEREMEMBER 0x0100 359 #define IMF_MULTIPLEEDIT 0x0400 360 361 #define WBF_CLASS ((BYTE) 0x0F) 362 #define WBF_ISWHITE ((BYTE) 0x10) 363 #define WBF_BREAKLINE ((BYTE) 0x20) 364 #define WBF_BREAKAFTER ((BYTE) 0x40) 365 366 typedef LONG (*EDITWORDBREAKPROCEX)(char *pchText,LONG cchText,BYTE bCharSet,INT action); 367 368 typedef struct _charformat { 369 UINT cbSize; 370 DWORD dwMask; 371 DWORD dwEffects; 372 LONG yHeight; 373 LONG yOffset; 374 COLORREF crTextColor; 375 BYTE bCharSet; 376 BYTE bPitchAndFamily; 377 char szFaceName[LF_FACESIZE]; 378 } CHARFORMATA; 379 380 typedef struct _charformatw { 381 UINT cbSize; 382 DWORD dwMask; 383 DWORD dwEffects; 384 LONG yHeight; 385 LONG yOffset; 386 COLORREF crTextColor; 387 BYTE bCharSet; 388 BYTE bPitchAndFamily; 389 WCHAR szFaceName[LF_FACESIZE]; 390 } CHARFORMATW; 391 392 #if (_RICHEDIT_VER >= 0x0200) 393 #define CHARFORMAT __MINGW_NAME_AW(CHARFORMAT) 394 #else 395 #define CHARFORMAT CHARFORMATA 396 #endif 397 398 #ifdef __cplusplus 399 400 struct CHARFORMAT2W : _charformatw { 401 WORD wWeight; 402 SHORT sSpacing; 403 COLORREF crBackColor; 404 LCID lcid; 405 DWORD dwReserved; 406 SHORT sStyle; 407 WORD wKerning; 408 BYTE bUnderlineType; 409 BYTE bAnimation; 410 BYTE bRevAuthor; 411 }; 412 413 struct CHARFORMAT2A : _charformat { 414 WORD wWeight; 415 SHORT sSpacing; 416 COLORREF crBackColor; 417 LCID lcid; 418 DWORD dwReserved; 419 SHORT sStyle; 420 WORD wKerning; 421 BYTE bUnderlineType; 422 BYTE bAnimation; 423 BYTE bRevAuthor; 424 }; 425 #else 426 427 typedef struct _charformat2w { 428 UINT cbSize; 429 DWORD dwMask; 430 DWORD dwEffects; 431 LONG yHeight; 432 LONG yOffset; 433 COLORREF crTextColor; 434 BYTE bCharSet; 435 BYTE bPitchAndFamily; 436 WCHAR szFaceName[LF_FACESIZE]; 437 WORD wWeight; 438 SHORT sSpacing; 439 COLORREF crBackColor; 440 LCID lcid; 441 DWORD dwReserved; 442 SHORT sStyle; 443 WORD wKerning; 444 BYTE bUnderlineType; 445 BYTE bAnimation; 446 BYTE bRevAuthor; 447 BYTE bReserved1; 448 } CHARFORMAT2W; 449 450 typedef struct _charformat2a { 451 UINT cbSize; 452 DWORD dwMask; 453 DWORD dwEffects; 454 LONG yHeight; 455 LONG yOffset; 456 COLORREF crTextColor; 457 BYTE bCharSet; 458 BYTE bPitchAndFamily; 459 char szFaceName[LF_FACESIZE]; 460 WORD wWeight; 461 SHORT sSpacing; 462 COLORREF crBackColor; 463 LCID lcid; 464 DWORD dwReserved; 465 SHORT sStyle; 466 WORD wKerning; 467 BYTE bUnderlineType; 468 BYTE bAnimation; 469 BYTE bRevAuthor; 470 } CHARFORMAT2A; 471 #endif 472 473 #define CHARFORMAT2 __MINGW_NAME_AW(CHARFORMAT2) 474 475 #define CHARFORMATDELTA (sizeof(CHARFORMAT2) - sizeof(CHARFORMAT)) 476 477 #define CFM_BOLD 0x00000001 478 #define CFM_ITALIC 0x00000002 479 #define CFM_UNDERLINE 0x00000004 480 #define CFM_STRIKEOUT 0x00000008 481 #define CFM_PROTECTED 0x00000010 482 #define CFM_LINK 0x00000020 483 #define CFM_SIZE 0x80000000 484 #define CFM_COLOR 0x40000000 485 #define CFM_FACE 0x20000000 486 #define CFM_OFFSET 0x10000000 487 #define CFM_CHARSET 0x08000000 488 489 #define CFE_BOLD 0x0001 490 #define CFE_ITALIC 0x0002 491 #define CFE_UNDERLINE 0x0004 492 #define CFE_STRIKEOUT 0x0008 493 #define CFE_PROTECTED 0x0010 494 #define CFE_LINK 0x0020 495 #define CFE_AUTOCOLOR 0x40000000 496 497 #define CFM_SMALLCAPS 0x0040 498 #define CFM_ALLCAPS 0x0080 499 #define CFM_HIDDEN 0x0100 500 #define CFM_OUTLINE 0x0200 501 #define CFM_SHADOW 0x0400 502 #define CFM_EMBOSS 0x0800 503 #define CFM_IMPRINT 0x1000 504 #define CFM_DISABLED 0x2000 505 #define CFM_REVISED 0x4000 506 507 #define CFM_BACKCOLOR 0x04000000 508 #define CFM_LCID 0x02000000 509 #define CFM_UNDERLINETYPE 0x00800000 510 #define CFM_WEIGHT 0x00400000 511 #define CFM_SPACING 0x00200000 512 #define CFM_KERNING 0x00100000 513 #define CFM_STYLE 0x00080000 514 #define CFM_ANIMATION 0x00040000 515 #define CFM_REVAUTHOR 0x00008000 516 517 #define CFE_SUBSCRIPT 0x00010000 518 #define CFE_SUPERSCRIPT 0x00020000 519 520 #define CFM_SUBSCRIPT CFE_SUBSCRIPT | CFE_SUPERSCRIPT 521 #define CFM_SUPERSCRIPT CFM_SUBSCRIPT 522 523 #define CFM_EFFECTS (CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_COLOR | CFM_STRIKEOUT | CFE_PROTECTED | CFM_LINK) 524 #define CFM_ALL (CFM_EFFECTS | CFM_SIZE | CFM_FACE | CFM_OFFSET | CFM_CHARSET) 525 #define CFM_EFFECTS2 (CFM_EFFECTS | CFM_DISABLED | CFM_SMALLCAPS | CFM_ALLCAPS | CFM_HIDDEN | CFM_OUTLINE | CFM_SHADOW | CFM_EMBOSS | CFM_IMPRINT | CFM_DISABLED | CFM_REVISED | CFM_SUBSCRIPT | CFM_SUPERSCRIPT | CFM_BACKCOLOR) 526 #define CFM_ALL2 (CFM_ALL | CFM_EFFECTS2 | CFM_BACKCOLOR | CFM_LCID | CFM_UNDERLINETYPE | CFM_WEIGHT | CFM_REVAUTHOR | CFM_SPACING | CFM_KERNING | CFM_STYLE | CFM_ANIMATION) 527 528 #define CFE_SMALLCAPS CFM_SMALLCAPS 529 #define CFE_ALLCAPS CFM_ALLCAPS 530 #define CFE_HIDDEN CFM_HIDDEN 531 #define CFE_OUTLINE CFM_OUTLINE 532 #define CFE_SHADOW CFM_SHADOW 533 #define CFE_EMBOSS CFM_EMBOSS 534 #define CFE_IMPRINT CFM_IMPRINT 535 #define CFE_DISABLED CFM_DISABLED 536 #define CFE_REVISED CFM_REVISED 537 538 #define CFE_AUTOBACKCOLOR CFM_BACKCOLOR 539 540 #define CFU_CF1UNDERLINE 0xFF 541 #define CFU_INVERT 0xFE 542 #define CFU_UNDERLINETHICKLONGDASH 18 543 #define CFU_UNDERLINETHICKDOTTED 17 544 #define CFU_UNDERLINETHICKDASHDOTDOT 16 545 #define CFU_UNDERLINETHICKDASHDOT 15 546 #define CFU_UNDERLINETHICKDASH 14 547 #define CFU_UNDERLINELONGDASH 13 548 #define CFU_UNDERLINEHEAVYWAVE 12 549 #define CFU_UNDERLINEDOUBLEWAVE 11 550 #define CFU_UNDERLINEHAIRLINE 10 551 #define CFU_UNDERLINETHICK 9 552 #define CFU_UNDERLINEWAVE 8 553 #define CFU_UNDERLINEDASHDOTDOT 7 554 #define CFU_UNDERLINEDASHDOT 6 555 #define CFU_UNDERLINEDASH 5 556 #define CFU_UNDERLINEDOTTED 4 557 #define CFU_UNDERLINEDOUBLE 3 558 #define CFU_UNDERLINEWORD 2 559 #define CFU_UNDERLINE 1 560 #define CFU_UNDERLINENONE 0 561 562 #define yHeightCharPtsMost 1638 563 564 #define SCF_SELECTION 0x0001 565 #define SCF_WORD 0x0002 566 #define SCF_DEFAULT 0x0000 567 #define SCF_ALL 0x0004 568 #define SCF_USEUIRULES 0x0008 569 570 #define SCF_ASSOCIATEFONT 0x0010 571 572 #define SCF_NOKBUPDATE 0x0020 573 574 #define SCF_ASSOCIATEFONT2 0x0040 575 576 typedef struct _charrange { 577 LONG cpMin; 578 LONG cpMax; 579 } CHARRANGE; 580 581 typedef struct _textrange { 582 CHARRANGE chrg; 583 LPSTR lpstrText; 584 } TEXTRANGEA; 585 586 typedef struct _textrangew { 587 CHARRANGE chrg; 588 LPWSTR lpstrText; 589 } TEXTRANGEW; 590 591 #if (_RICHEDIT_VER >= 0x0200) 592 #define TEXTRANGE __MINGW_NAME_AW(TEXTRANGE) 593 #else 594 #define TEXTRANGE TEXTRANGEA 595 #endif 596 597 typedef DWORD (CALLBACK *EDITSTREAMCALLBACK)(DWORD_PTR dwCookie,LPBYTE pbBuff,LONG cb,LONG *pcb); 598 599 typedef struct _editstream { 600 DWORD_PTR dwCookie; 601 DWORD dwError; 602 EDITSTREAMCALLBACK pfnCallback; 603 } EDITSTREAM; 604 605 #define SF_TEXT 0x0001 606 #define SF_RTF 0x0002 607 #define SF_RTFNOOBJS 0x0003 608 #define SF_TEXTIZED 0x0004 609 610 #define SF_UNICODE 0x0010 611 #define SF_USECODEPAGE 0x0020 612 #define SF_NCRFORNONASCII 0x40 613 #define SFF_WRITEXTRAPAR 0x80 614 615 #define SFF_SELECTION 0x8000 616 617 #define SFF_PLAINRTF 0x4000 618 619 #define SFF_PERSISTVIEWSCALE 0x2000 620 621 #define SFF_KEEPDOCINFO 0x1000 622 623 #define SFF_PWD 0x0800 624 625 #define SF_RTFVAL 0x0700 626 627 typedef struct _findtext { 628 CHARRANGE chrg; 629 LPCSTR lpstrText; 630 } FINDTEXTA; 631 632 typedef struct _findtextw { 633 CHARRANGE chrg; 634 LPCWSTR lpstrText; 635 } FINDTEXTW; 636 637 #if (_RICHEDIT_VER >= 0x0200) 638 #define FINDTEXT __MINGW_NAME_AW(FINDTEXT) 639 #else 640 #define FINDTEXT FINDTEXTA 641 #endif 642 643 typedef struct _findtextexa { 644 CHARRANGE chrg; 645 LPCSTR lpstrText; 646 CHARRANGE chrgText; 647 } FINDTEXTEXA; 648 649 typedef struct _findtextexw { 650 CHARRANGE chrg; 651 LPCWSTR lpstrText; 652 CHARRANGE chrgText; 653 } FINDTEXTEXW; 654 655 #if (_RICHEDIT_VER >= 0x0200) 656 #define FINDTEXTEX __MINGW_NAME_AW(FINDTEXTEX) 657 #else 658 #define FINDTEXTEX FINDTEXTEXA 659 #endif 660 661 typedef struct _formatrange { 662 HDC hdc; 663 HDC hdcTarget; 664 RECT rc; 665 RECT rcPage; 666 CHARRANGE chrg; 667 } FORMATRANGE; 668 669 #define MAX_TAB_STOPS 32 670 #define lDefaultTab 720 671 #define MAX_TABLE_CELLS 63 672 673 #define wReserved wEffects 674 675 typedef struct _paraformat { 676 UINT cbSize; 677 DWORD dwMask; 678 WORD wNumbering; 679 WORD wEffects; 680 LONG dxStartIndent; 681 LONG dxRightIndent; 682 LONG dxOffset; 683 WORD wAlignment; 684 SHORT cTabCount; 685 LONG rgxTabs[MAX_TAB_STOPS]; 686 } PARAFORMAT; 687 688 #ifdef __cplusplus 689 struct PARAFORMAT2 : _paraformat { 690 LONG dySpaceBefore; 691 LONG dySpaceAfter; 692 LONG dyLineSpacing; 693 SHORT sStyle; 694 BYTE bLineSpacingRule; 695 BYTE bOutlineLevel; 696 WORD wShadingWeight; 697 WORD wShadingStyle; 698 WORD wNumberingStart; 699 WORD wNumberingStyle; 700 WORD wNumberingTab; 701 WORD wBorderSpace; 702 WORD wBorderWidth; 703 WORD wBorders; 704 }; 705 #else 706 typedef struct _paraformat2 { 707 UINT cbSize; 708 DWORD dwMask; 709 WORD wNumbering; 710 WORD wReserved; 711 LONG dxStartIndent; 712 LONG dxRightIndent; 713 LONG dxOffset; 714 WORD wAlignment; 715 SHORT cTabCount; 716 LONG rgxTabs[MAX_TAB_STOPS]; 717 LONG dySpaceBefore; 718 LONG dySpaceAfter; 719 LONG dyLineSpacing; 720 SHORT sStyle; 721 BYTE bLineSpacingRule; 722 BYTE bOutlineLevel; 723 WORD wShadingWeight; 724 WORD wShadingStyle; 725 WORD wNumberingStart; 726 WORD wNumberingStyle; 727 WORD wNumberingTab; 728 WORD wBorderSpace; 729 WORD wBorderWidth; 730 WORD wBorders; 731 } PARAFORMAT2; 732 #endif 733 734 #define PFM_STARTINDENT 0x00000001 735 #define PFM_RIGHTINDENT 0x00000002 736 #define PFM_OFFSET 0x00000004 737 #define PFM_ALIGNMENT 0x00000008 738 #define PFM_TABSTOPS 0x00000010 739 #define PFM_NUMBERING 0x00000020 740 #define PFM_OFFSETINDENT 0x80000000 741 742 #define PFM_SPACEBEFORE 0x00000040 743 #define PFM_SPACEAFTER 0x00000080 744 #define PFM_LINESPACING 0x00000100 745 #define PFM_STYLE 0x00000400 746 #define PFM_BORDER 0x00000800 747 #define PFM_SHADING 0x00001000 748 #define PFM_NUMBERINGSTYLE 0x00002000 749 #define PFM_NUMBERINGTAB 0x00004000 750 #define PFM_NUMBERINGSTART 0x00008000 751 752 #define PFM_RTLPARA 0x00010000 753 #define PFM_KEEP 0x00020000 754 #define PFM_KEEPNEXT 0x00040000 755 #define PFM_PAGEBREAKBEFORE 0x00080000 756 #define PFM_NOLINENUMBER 0x00100000 757 #define PFM_NOWIDOWCONTROL 0x00200000 758 #define PFM_DONOTHYPHEN 0x00400000 759 #define PFM_SIDEBYSIDE 0x00800000 760 #define PFM_TABLE 0x40000000 761 #define PFM_TEXTWRAPPINGBREAK 0x20000000 762 #define PFM_TABLEROWDELIMITER 0x10000000 763 764 #define PFM_COLLAPSED 0x01000000 765 #define PFM_OUTLINELEVEL 0x02000000 766 #define PFM_BOX 0x04000000 767 #define PFM_RESERVED2 0x08000000 768 769 #define PFM_ALL (PFM_STARTINDENT | PFM_RIGHTINDENT | PFM_OFFSET | PFM_ALIGNMENT | PFM_TABSTOPS | PFM_NUMBERING | PFM_OFFSETINDENT| PFM_RTLPARA) 770 #define PFM_EFFECTS (PFM_RTLPARA | PFM_KEEP | PFM_KEEPNEXT | PFM_TABLE | PFM_PAGEBREAKBEFORE | PFM_NOLINENUMBER | PFM_NOWIDOWCONTROL | PFM_DONOTHYPHEN | PFM_SIDEBYSIDE | PFM_TABLE | PFM_TABLEROWDELIMITER) 771 #define PFM_ALL2 (PFM_ALL | PFM_EFFECTS | PFM_SPACEBEFORE | PFM_SPACEAFTER | PFM_LINESPACING | PFM_STYLE | PFM_SHADING | PFM_BORDER | PFM_NUMBERINGTAB | PFM_NUMBERINGSTART | PFM_NUMBERINGSTYLE) 772 773 #define PFE_RTLPARA (PFM_RTLPARA >> 16) 774 #define PFE_KEEP (PFM_KEEP >> 16) 775 #define PFE_KEEPNEXT (PFM_KEEPNEXT >> 16) 776 #define PFE_PAGEBREAKBEFORE (PFM_PAGEBREAKBEFORE >> 16) 777 #define PFE_NOLINENUMBER (PFM_NOLINENUMBER >> 16) 778 #define PFE_NOWIDOWCONTROL (PFM_NOWIDOWCONTROL >> 16) 779 #define PFE_DONOTHYPHEN (PFM_DONOTHYPHEN >> 16) 780 #define PFE_SIDEBYSIDE (PFM_SIDEBYSIDE >> 16) 781 #define PFE_TEXTWRAPPINGBREAK (PFM_TEXTWRAPPINGBREAK>>16) 782 783 #define PFE_COLLAPSED (PFM_COLLAPSED >> 16) 784 #define PFE_BOX (PFM_BOX >> 16) 785 #define PFE_TABLE (PFM_TABLE >> 16) 786 #define PFE_TABLEROWDELIMITER (PFM_TABLEROWDELIMITER>>16) 787 788 #define PFN_BULLET 1 789 790 #define PFN_ARABIC 2 791 #define PFN_LCLETTER 3 792 #define PFN_UCLETTER 4 793 #define PFN_LCROMAN 5 794 #define PFN_UCROMAN 6 795 796 #define PFNS_PAREN 0x000 797 #define PFNS_PARENS 0x100 798 #define PFNS_PERIOD 0x200 799 #define PFNS_PLAIN 0x300 800 #define PFNS_NONUMBER 0x400 801 802 #define PFNS_NEWNUMBER 0x8000 803 804 #define PFA_LEFT 1 805 #define PFA_RIGHT 2 806 #define PFA_CENTER 3 807 808 #define PFA_JUSTIFY 4 809 #define PFA_FULL_INTERWORD 4 810 #define PFA_FULL_INTERLETTER 5 811 #define PFA_FULL_SCALED 6 812 #define PFA_FULL_GLYPHS 7 813 #define PFA_SNAP_GRID 8 814 815 #ifndef WM_NOTIFY 816 #define WM_NOTIFY 0x004E 817 818 typedef struct _nmhdr { 819 HWND hwndFrom; 820 UINT idFrom; 821 UINT code; 822 } NMHDR; 823 #endif 824 825 typedef struct _msgfilter { 826 NMHDR nmhdr; 827 UINT msg; 828 WPARAM wParam; 829 LPARAM lParam; 830 } MSGFILTER; 831 832 typedef struct _reqresize { 833 NMHDR nmhdr; 834 RECT rc; 835 } REQRESIZE; 836 837 typedef struct _selchange { 838 NMHDR nmhdr; 839 CHARRANGE chrg; 840 WORD seltyp; 841 } SELCHANGE; 842 843 #define SEL_EMPTY 0x0000 844 #define SEL_TEXT 0x0001 845 #define SEL_OBJECT 0x0002 846 #define SEL_MULTICHAR 0x0004 847 #define SEL_MULTIOBJECT 0x0008 848 849 #define GCM_RIGHTMOUSEDROP 0x8000 850 851 typedef struct _endropfiles { 852 NMHDR nmhdr; 853 HANDLE hDrop; 854 LONG cp; 855 WINBOOL fProtected; 856 } ENDROPFILES; 857 858 typedef struct _enprotected { 859 NMHDR nmhdr; 860 UINT msg; 861 WPARAM wParam; 862 LPARAM lParam; 863 CHARRANGE chrg; 864 } ENPROTECTED; 865 866 typedef struct _ensaveclipboard { 867 NMHDR nmhdr; 868 LONG cObjectCount; 869 LONG cch; 870 } ENSAVECLIPBOARD; 871 872 typedef struct _enoleopfailed { 873 NMHDR nmhdr; 874 LONG iob; 875 LONG lOper; 876 HRESULT hr; 877 } ENOLEOPFAILED; 878 879 #define OLEOP_DOVERB 1 880 881 typedef struct _objectpositions { 882 NMHDR nmhdr; 883 LONG cObjectCount; 884 LONG *pcpPositions; 885 } OBJECTPOSITIONS; 886 887 typedef struct _enlink { 888 NMHDR nmhdr; 889 UINT msg; 890 WPARAM wParam; 891 LPARAM lParam; 892 CHARRANGE chrg; 893 } ENLINK; 894 895 typedef struct _enlowfirtf { 896 NMHDR nmhdr; 897 char *szControl; 898 } ENLOWFIRTF; 899 900 typedef struct _encorrecttext { 901 NMHDR nmhdr; 902 CHARRANGE chrg; 903 WORD seltyp; 904 } ENCORRECTTEXT; 905 906 typedef struct _punctuation { 907 UINT iSize; 908 LPSTR szPunctuation; 909 } PUNCTUATION; 910 911 typedef struct _compcolor { 912 COLORREF crText; 913 COLORREF crBackground; 914 DWORD dwEffects; 915 } COMPCOLOR; 916 917 #define CF_RTF TEXT("Rich Text Format") 918 #define CF_RTFNOOBJS TEXT("Rich Text Format Without Objects") 919 #define CF_RETEXTOBJ TEXT("RichEdit Text and Objects") 920 921 typedef struct _repastespecial { 922 DWORD dwAspect; 923 DWORD_PTR dwParam; 924 } REPASTESPECIAL; 925 926 typedef enum _undonameid { 927 UID_UNKNOWN = 0,UID_TYPING = 1,UID_DELETE = 2,UID_DRAGDROP = 3,UID_CUT = 4,UID_PASTE = 5,UID_AUTOCORRECT = 6 928 } UNDONAMEID; 929 930 #define ST_DEFAULT 0 931 #define ST_KEEPUNDO 1 932 #define ST_SELECTION 2 933 #define ST_NEWCHARS 4 934 935 typedef struct _settextex { 936 DWORD flags; 937 UINT codepage; 938 } SETTEXTEX; 939 940 #define GT_DEFAULT 0 941 #define GT_USECRLF 1 942 #define GT_SELECTION 2 943 #define GT_RAWTEXT 4 944 #define GT_NOHIDDENTEXT 8 945 946 typedef struct _gettextex { 947 DWORD cb; 948 DWORD flags; 949 UINT codepage; 950 LPCSTR lpDefaultChar; 951 LPBOOL lpUsedDefChar; 952 } GETTEXTEX; 953 954 #define GTL_DEFAULT 0 955 #define GTL_USECRLF 1 956 #define GTL_PRECISE 2 957 #define GTL_CLOSE 4 958 #define GTL_NUMCHARS 8 959 #define GTL_NUMBYTES 16 960 961 typedef struct _gettextlengthex { 962 DWORD flags; 963 UINT codepage; 964 } GETTEXTLENGTHEX; 965 966 typedef struct _bidioptions { 967 UINT cbSize; 968 WORD wMask; 969 WORD wEffects; 970 } BIDIOPTIONS; 971 972 #if (_RICHEDIT_VER==0x0100) 973 #define BOM_DEFPARADIR 0x0001 974 #define BOM_PLAINTEXT 0x0002 975 #endif 976 #define BOM_NEUTRALOVERRIDE 0x0004 977 #define BOM_CONTEXTREADING 0x0008 978 #define BOM_CONTEXTALIGNMENT 0x0010 979 980 #if (_RICHEDIT_VER==0x0100) 981 #define BOE_RTLDIR 0x0001 982 #define BOE_PLAINTEXT 0x0002 983 #endif 984 #define BOE_NEUTRALOVERRIDE 0x0004 985 #define BOE_CONTEXTREADING 0x0008 986 #define BOE_CONTEXTALIGNMENT 0x0010 987 988 #define FR_MATCHDIAC 0x20000000 989 #define FR_MATCHKASHIDA 0x40000000 990 #define FR_MATCHALEFHAMZA 0x80000000 991 992 #ifndef WCH_EMBEDDING 993 #define WCH_EMBEDDING (WCHAR)0xFFFC 994 #endif 995 996 typedef enum tagKHYPH { 997 khyphNil,khyphNormal,khyphAddBefore,khyphChangeBefore,khyphDeleteBefore,khyphChangeAfter,khyphDelAndChange 998 } KHYPH; 999 1000 typedef struct hyphresult { 1001 KHYPH khyph; 1002 __LONG32 ichHyph; 1003 WCHAR chHyph; 1004 } HYPHRESULT; 1005 1006 void WINAPI HyphenateProc(WCHAR *pszWord,LANGID langid,__LONG32 ichExceed,HYPHRESULT *phyphresult); 1007 1008 typedef struct tagHyphenateInfo { 1009 SHORT cbSize; 1010 SHORT dxHyphenateZone; 1011 void (WINAPI *pfnHyphenate)(WCHAR*,LANGID,__LONG32,HYPHRESULT*); 1012 } HYPHENATEINFO; 1013 1014 #include <poppack.h> 1015 1016 #ifdef __cplusplus 1017 } 1018 #endif 1019 #endif 1020