[1] | 1 | ' api_richedit.sbp
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 | #ifndef _INC_RICHEDIT
|
---|
| 5 | #define _INC_RICHEDIT
|
---|
| 6 |
|
---|
| 7 |
|
---|
| 8 | Const MAX_TAB_STOPS = 32
|
---|
| 9 |
|
---|
| 10 |
|
---|
| 11 | 'CHARFORMAT struct
|
---|
| 12 | Const CFM_BOLD = &H00000001
|
---|
| 13 | Const CFM_ITALIC = &H00000002
|
---|
| 14 | Const CFM_UNDERLINE = &H00000004
|
---|
| 15 | Const CFM_STRIKEOUT = &H00000008
|
---|
| 16 | Const CFM_PROTECTED = &H00000010
|
---|
| 17 | Const CFM_LINK = &H00000020
|
---|
| 18 | Const CFM_SIZE = &H80000000
|
---|
| 19 | Const CFM_COLOR = &H40000000
|
---|
| 20 | Const CFM_FACE = &H20000000
|
---|
| 21 | Const CFM_OFFSET = &H10000000
|
---|
| 22 | Const CFM_CHARSET = &H08000000
|
---|
| 23 |
|
---|
| 24 | Const CFE_BOLD = &H0001
|
---|
| 25 | Const CFE_ITALIC = &H0002
|
---|
| 26 | Const CFE_UNDERLINE = &H0004
|
---|
| 27 | Const CFE_STRIKEOUT = &H0008
|
---|
| 28 | Const CFE_PROTECTED = &H0010
|
---|
| 29 | Const CFE_LINK = &H0020
|
---|
| 30 | Const CFE_AUTOCOLOR = &H40000000
|
---|
| 31 |
|
---|
[141] | 32 | Type CHARFORMATW
|
---|
[1] | 33 | cbSize As DWord
|
---|
| 34 | dwMask As DWord
|
---|
| 35 | dwEffects As DWord
|
---|
| 36 | yHeight As Long
|
---|
| 37 | yOffset As Long
|
---|
[141] | 38 | crTextColor As COLORREF
|
---|
[1] | 39 | bCharSet As Byte
|
---|
| 40 | bPitchAndFamily As Byte
|
---|
[141] | 41 | szFaceName[ELM(LF_FACESIZE)] As WCHAR
|
---|
[1] | 42 | End Type
|
---|
[141] | 43 | Type CHARFORMATA
|
---|
| 44 | cbSize As DWord
|
---|
| 45 | dwMask As DWord
|
---|
| 46 | dwEffects As DWord
|
---|
| 47 | yHeight As Long
|
---|
| 48 | yOffset As Long
|
---|
| 49 | crTextColor As COLORREF
|
---|
| 50 | bCharSet As Byte
|
---|
| 51 | bPitchAndFamily As Byte
|
---|
| 52 | szFaceName[ELM(LF_FACESIZE)] As SByte
|
---|
| 53 | End Type
|
---|
| 54 | #ifdef UNICODE
|
---|
| 55 | TypeDef CHARFORMAT = CHARFORMATW
|
---|
| 56 | #else
|
---|
| 57 | TypeDef CHARFORMAT = CHARFORMATA
|
---|
| 58 | #endif
|
---|
[1] | 59 |
|
---|
| 60 | 'CHARFORMAT2 struct
|
---|
| 61 | Const CFM_SMALLCAPS = &H0040
|
---|
| 62 | Const CFM_ALLCAPS = &H0080
|
---|
| 63 | Const CFM_HIDDEN = &H0100
|
---|
| 64 | Const CFM_OUTLINE = &H0200
|
---|
| 65 | Const CFM_SHADOW = &H0400
|
---|
| 66 | Const CFM_EMBOSS = &H0800
|
---|
| 67 | Const CFM_IMPRINT = &H1000
|
---|
| 68 | Const CFM_DISABLED = &H2000
|
---|
| 69 | Const CFM_REVISED = &H4000
|
---|
| 70 | Const CFM_BACKCOLOR = &H04000000
|
---|
| 71 | Const CFM_LCID = &H02000000
|
---|
| 72 | Const CFM_UNDERLINETYPE = &H00800000
|
---|
| 73 | Const CFM_WEIGHT = &H00400000
|
---|
| 74 | Const CFM_SPACING = &H00200000
|
---|
| 75 | Const CFM_KERNING = &H00100000
|
---|
| 76 | Const CFM_STYLE = &H00080000
|
---|
| 77 | Const CFM_ANIMATION = &H00040000
|
---|
| 78 | Const CFM_REVAUTHOR = &H00008000
|
---|
| 79 | Const CFM_SUBSCRIPT = &H00030000
|
---|
| 80 | Const CFM_SUPERSCRIPT = CFM_SUBSCRIPT
|
---|
| 81 |
|
---|
| 82 | Const CFE_SUBSCRIPT = &H00010000
|
---|
| 83 | Const CFE_SUPERSCRIPT = &H00020000
|
---|
| 84 | Const CFE_SMALLCAPS = CFM_SMALLCAPS
|
---|
| 85 | Const CFE_ALLCAPS = CFM_ALLCAPS
|
---|
| 86 | Const CFE_HIDDEN = CFM_HIDDEN
|
---|
| 87 | Const CFE_OUTLINE = CFM_OUTLINE
|
---|
| 88 | Const CFE_SHADOW = CFM_SHADOW
|
---|
| 89 | Const CFE_EMBOSS = CFM_EMBOSS
|
---|
| 90 | Const CFE_IMPRINT = CFM_IMPRINT
|
---|
| 91 | Const CFE_DISABLED = CFM_DISABLED
|
---|
| 92 | Const CFE_REVISED = CFM_REVISED
|
---|
| 93 |
|
---|
| 94 | Const CFU_CF1UNDERLINE = &HFF
|
---|
| 95 | Const CFU_INVERT = &HFE
|
---|
| 96 | Const CFU_UNDERLINEDOTTED = &H4
|
---|
| 97 | Const CFU_UNDERLINEDOUBLE = &H3
|
---|
| 98 | Const CFU_UNDERLINEWORD = &H2
|
---|
| 99 | Const CFU_UNDERLINE = &H1
|
---|
| 100 | Const CFU_UNDERLINENONE = 0
|
---|
| 101 |
|
---|
[141] | 102 | Type CHARFORMAT2W
|
---|
[1] | 103 | cbSize As DWord
|
---|
| 104 | dwMask As DWord
|
---|
| 105 | dwEffects As DWord
|
---|
| 106 | yHeight As Long
|
---|
| 107 | yOffset As Long
|
---|
| 108 | crTextColor As DWord
|
---|
| 109 | bCharSet As Byte
|
---|
| 110 | bPitchAndFamily As Byte
|
---|
[141] | 111 | szFaceName[ELM(LF_FACESIZE)] As WCHAR
|
---|
[1] | 112 | wWeight As Word
|
---|
| 113 | sSpacing As Integer
|
---|
| 114 | crBackColor As DWord
|
---|
| 115 | lcid As DWord
|
---|
| 116 | dwReserved As DWord
|
---|
| 117 | sStyle As Integer
|
---|
| 118 | wKerning As Word
|
---|
| 119 | bUnderlineType As Byte
|
---|
| 120 | bAnimation As Byte
|
---|
| 121 | bRevAuthor As Byte
|
---|
| 122 | bReserved1 As Byte
|
---|
| 123 | End Type
|
---|
[141] | 124 | Type CHARFORMAT2A
|
---|
| 125 | cbSize As DWord
|
---|
| 126 | dwMask As DWord
|
---|
| 127 | dwEffects As DWord
|
---|
| 128 | yHeight As Long
|
---|
| 129 | yOffset As Long
|
---|
| 130 | crTextColor As DWord
|
---|
| 131 | bCharSet As Byte
|
---|
| 132 | bPitchAndFamily As Byte
|
---|
[281] | 133 | szFaceName[ELM(LF_FACESIZE)] As CHAR
|
---|
[141] | 134 | wWeight As Word
|
---|
| 135 | sSpacing As Integer
|
---|
| 136 | crBackColor As DWord
|
---|
| 137 | lcid As DWord
|
---|
| 138 | dwReserved As DWord
|
---|
| 139 | sStyle As Integer
|
---|
| 140 | wKerning As Word
|
---|
| 141 | bUnderlineType As Byte
|
---|
| 142 | bAnimation As Byte
|
---|
| 143 | bRevAuthor As Byte
|
---|
| 144 | bReserved1 As Byte
|
---|
| 145 | End Type
|
---|
| 146 | #ifdef UNICODE
|
---|
| 147 | TypeDef CHARFORMAT2 = CHARFORMAT2W
|
---|
| 148 | #else
|
---|
| 149 | TypeDef CHARFORMAT2 = CHARFORMAT2A
|
---|
| 150 | #endif
|
---|
[1] | 151 |
|
---|
| 152 |
|
---|
| 153 | 'PARAFORMAT struct
|
---|
| 154 | Const PFM_STARTINDENT = &H00000001
|
---|
| 155 | Const PFM_RIGHTINDENT = &H00000002
|
---|
| 156 | Const PFM_OFFSET = &H00000004
|
---|
| 157 | Const PFM_ALIGNMENT = &H00000008
|
---|
| 158 | Const PFM_TABSTOPS = &H00000010
|
---|
| 159 | Const PFM_NUMBERING = &H00000020
|
---|
| 160 | Const PFM_OFFSETINDENT = &H80000000
|
---|
| 161 |
|
---|
| 162 | Const PFA_LEFT = &H0001
|
---|
| 163 | Const PFA_RIGHT = &H0002
|
---|
| 164 | Const PFA_CENTER = &H0003
|
---|
| 165 |
|
---|
| 166 | Type PARAFORMAT
|
---|
| 167 | cbSize As DWord
|
---|
| 168 | dwMask As DWord
|
---|
| 169 | wNumbering As Word
|
---|
| 170 | wReserved As Word
|
---|
| 171 | dxStartIndent As Long
|
---|
| 172 | dxRightIndent As Long
|
---|
| 173 | dxOffset As Long
|
---|
| 174 | wAlignment As Word
|
---|
| 175 | cTabCount As Integer
|
---|
| 176 | rgxTabs[ELM(MAX_TAB_STOPS)] As Long
|
---|
| 177 | End Type
|
---|
| 178 |
|
---|
| 179 |
|
---|
| 180 | 'PARAFORMAT2 struct
|
---|
| 181 | Const PFM_SPACEBEFORE = &H00000040
|
---|
| 182 | Const PFM_SPACEAFTER = &H00000080
|
---|
| 183 | Const PFM_LINESPACING = &H00000100
|
---|
| 184 | Const PFM_STYLE = &H00000400
|
---|
| 185 | Const PFM_BORDER = &H00000800
|
---|
| 186 | Const PFM_SHADING = &H00001000
|
---|
| 187 | Const PFM_NUMBERINGSTYLE = &H00002000
|
---|
| 188 | Const PFM_NUMBERINGTAB = &H00004000
|
---|
| 189 | Const PFM_NUMBERINGSTART = &H00008000
|
---|
| 190 | Const PFM_DIR = &H00010000
|
---|
| 191 | Const PFM_RTLPARA = &H00010000
|
---|
| 192 | Const PFM_KEEP = &H00020000
|
---|
| 193 | Const PFM_KEEPNEXT = &H00040000
|
---|
| 194 | Const PFM_PAGEBREAKBEFORE = &H00080000
|
---|
| 195 | Const PFM_NOLINENUMBER = &H00100000
|
---|
| 196 | Const PFM_NOWIDOWCONTROL = &H00200000
|
---|
| 197 | Const PFM_DONOTHYPHEN = &H00400000
|
---|
| 198 | Const PFM_SIDEBYSIDE = &H00800000
|
---|
| 199 | Const PFM_TABLE = &Hc0000000
|
---|
| 200 |
|
---|
| 201 | Const PFE_RTLPARA = PFM_DIR >> 16
|
---|
| 202 | Const PFE_RTLPAR = PFM_RTLPARA >> 16
|
---|
| 203 | Const PFE_KEEP = PFM_KEEP >> 16
|
---|
| 204 | Const PFE_KEEPNEXT = PFM_KEEPNEXT >> 16
|
---|
| 205 | Const PFE_PAGEBREAKBEFORE = PFM_PAGEBREAKBEFORE >> 16
|
---|
| 206 | Const PFE_NOLINENUMBER = PFM_NOLINENUMBER >> 16
|
---|
| 207 | Const PFE_NOWIDOWCONTROL = PFM_NOWIDOWCONTROL >> 16
|
---|
| 208 | Const PFE_DONOTHYPHEN = PFM_DONOTHYPHEN >> 16
|
---|
| 209 | Const PFE_SIDEBYSIDE = PFM_SIDEBYSIDE >> 16
|
---|
| 210 |
|
---|
| 211 | Const PFA_JUSTIFY = &H0004
|
---|
| 212 |
|
---|
| 213 | Type PARAFORMAT2
|
---|
| 214 | cbSize As DWord
|
---|
| 215 | dwMask As DWord
|
---|
| 216 | wNumbering As Word
|
---|
| 217 | wReserved As Word
|
---|
| 218 | dxStartIndent As Long
|
---|
| 219 | dxRightIndent As Long
|
---|
| 220 | dxOffset As Long
|
---|
| 221 | wAlignment As Word
|
---|
| 222 | cTabCount As Integer
|
---|
| 223 | rgxTabs[ELM(MAX_TAB_STOPS)] As Long
|
---|
| 224 | dySpaceBefore As Long
|
---|
| 225 | dySpaceAfter As Long
|
---|
| 226 | dyLineSpacing As Long
|
---|
| 227 | sStyle As Integer
|
---|
| 228 | bLineSpacingRule As Byte
|
---|
| 229 | bCRC As Byte
|
---|
| 230 | wShadingWeight As Word
|
---|
| 231 | wShadingStyle As Word
|
---|
| 232 | wNumberingStart As Word
|
---|
| 233 | wNumberingStyle As Word
|
---|
| 234 | wNumberingTab As Word
|
---|
| 235 | wBorderSpace As Word
|
---|
| 236 | wBorderWidth As Word
|
---|
| 237 | wBorders As Word
|
---|
| 238 | End Type
|
---|
| 239 |
|
---|
| 240 |
|
---|
| 241 |
|
---|
| 242 | '----------
|
---|
| 243 | ' Messages
|
---|
| 244 | '----------
|
---|
| 245 |
|
---|
| 246 | Const EM_CANPASTE = WM_USER + 50
|
---|
| 247 | Const EM_DISPLAYBAND = WM_USER + 51
|
---|
| 248 | Const EM_EXGETSEL = WM_USER + 52
|
---|
| 249 | Const EM_EXLIMITTEXT = WM_USER + 53
|
---|
| 250 | Const EM_EXLINEFROMCHAR = WM_USER + 54
|
---|
| 251 | Const EM_EXSETSEL = WM_USER + 55
|
---|
| 252 | Const EM_FINDTEXT = WM_USER + 56
|
---|
| 253 | Const EM_FORMATRANGE = WM_USER + 57
|
---|
| 254 | Const EM_GETCHARFORMAT = WM_USER + 58
|
---|
| 255 | Const EM_GETEVENTMASK = WM_USER + 59
|
---|
| 256 | Const EM_GETOLEINTERFACE = WM_USER + 60
|
---|
| 257 | Const EM_GETPARAFORMAT = WM_USER + 61
|
---|
| 258 | Const EM_GETSELTEXT = WM_USER + 62
|
---|
| 259 | Const EM_HIDESELECTION = WM_USER + 63
|
---|
| 260 | Const EM_PASTESPECIAL = WM_USER + 64
|
---|
| 261 | Const EM_REQUESTRESIZE = WM_USER + 65
|
---|
| 262 | Const EM_SELECTIONTYPE = WM_USER + 66
|
---|
| 263 | Const EM_SETBKGNDCOLOR = WM_USER + 67
|
---|
| 264 |
|
---|
| 265 | Const EM_SETCHARFORMAT = WM_USER + 68
|
---|
| 266 | Const SCF_SELECTION = &H0001
|
---|
| 267 | Const SCF_WORD = &H0002
|
---|
| 268 | Const SCF_DEFAULT = &H0000
|
---|
| 269 | Const SCF_ALL = &H0004
|
---|
| 270 | Const SCF_USEUIRULES = &H0008
|
---|
| 271 |
|
---|
| 272 | Const EM_SETEVENTMASK = WM_USER + 69
|
---|
| 273 | Const ENM_NONE = &H00000000
|
---|
| 274 | Const ENM_CHANGE = &H00000001
|
---|
| 275 | Const ENM_UPDATE = &H00000002
|
---|
| 276 | Const ENM_SCROLL = &H00000004
|
---|
| 277 | Const ENM_KEYEVENTS = &H00010000
|
---|
| 278 | Const ENM_MOUSEEVENTS = &H00020000
|
---|
| 279 | Const ENM_REQUESTRESIZE = &H00040000
|
---|
| 280 | Const ENM_SELCHANGE = &H00080000
|
---|
| 281 | Const ENM_DROPFILES = &H00100000
|
---|
| 282 | Const ENM_PROTECTED = &H00200000
|
---|
| 283 | Const ENM_CORRECTTEXT = &H00400000
|
---|
| 284 | Const ENM_SCROLLEVENTS = &H00000008
|
---|
| 285 | Const ENM_DRAGDROPDONE = &H00000010
|
---|
| 286 | Const ENM_IMECHANGE = &H00800000
|
---|
| 287 | Const ENM_LANGCHANGE = &H01000000
|
---|
| 288 | Const ENM_OBJECTPOSITIONS = &H02000000
|
---|
| 289 | Const ENM_LINK = &H04000000
|
---|
| 290 |
|
---|
| 291 | Const EM_SETOLECALLBACK = WM_USER + 70
|
---|
| 292 | Const EM_SETPARAFORMAT = WM_USER + 71
|
---|
| 293 | Const EM_SETTARGETDEVICE = WM_USER + 72
|
---|
| 294 | Const EM_STREAMIN = WM_USER + 73
|
---|
| 295 | Const EM_STREAMOUT = WM_USER + 74
|
---|
| 296 | Const EM_GETTEXTRANGE = WM_USER + 75
|
---|
| 297 | Const EM_FINDWORDBREAK = WM_USER + 76
|
---|
| 298 | Const EM_SETOPTIONS = WM_USER + 77
|
---|
| 299 | Const EM_GETOPTIONS = WM_USER + 78
|
---|
| 300 | Const EM_FINDTEXTEX = WM_USER + 79
|
---|
| 301 | Const EM_GETWORDBREAKPROCEX = WM_USER + 80
|
---|
| 302 | Const EM_SETWORDBREAKPROCEX = WM_USER + 81
|
---|
| 303 | Const EM_SETUNDOLIMIT = WM_USER + 82
|
---|
| 304 | Const EM_REDO = WM_USER + 84
|
---|
| 305 | Const EM_CANREDO = WM_USER + 85
|
---|
| 306 | Const EM_GETUNDONAME = WM_USER + 86
|
---|
| 307 | Const EM_GETREDONAME = WM_USER + 87
|
---|
| 308 | Const EM_STOPGROUPTYPING = WM_USER + 88
|
---|
| 309 | Const EM_SETTEXTMODE = WM_USER + 89
|
---|
| 310 | Const EM_GETTEXTMODE = WM_USER + 90
|
---|
| 311 | Const EM_AUTOURLDETECT = WM_USER + 91
|
---|
| 312 | Const EM_GETAUTOURLDETECT = WM_USER + 92
|
---|
| 313 | Const EM_SETPALETTE = WM_USER + 93
|
---|
| 314 | Const EM_GETTEXTEX = WM_USER + 94
|
---|
| 315 | Const EM_GETTEXTLENGTHEX = WM_USER + 95
|
---|
| 316 | Const EM_SETPUNCTUATION = WM_USER + 100
|
---|
| 317 | Const EM_GETPUNCTUATION = WM_USER + 101
|
---|
| 318 | Const EM_SETWORDWRAPMODE = WM_USER + 102
|
---|
| 319 | Const EM_GETWORDWRAPMODE = WM_USER + 103
|
---|
| 320 | Const EM_SETIMECOLOR = WM_USER + 104
|
---|
| 321 | Const EM_GETIMECOLOR = WM_USER + 105
|
---|
| 322 | Const EM_SETIMEOPTIONS = WM_USER + 106
|
---|
| 323 | Const EM_GETIMEOPTIONS = WM_USER + 107
|
---|
| 324 | Const EM_CONVPOSITION = WM_USER + 108
|
---|
| 325 | Const EM_SETLANGOPTIONS = WM_USER + 120
|
---|
| 326 | Const EM_GETLANGOPTIONS = WM_USER + 121
|
---|
| 327 | Const EM_GETIMECOMPMODE = WM_USER + 122
|
---|
| 328 | Const EM_FINDTEXTW = WM_USER + 123
|
---|
| 329 | Const EM_FINDTEXTEXW = WM_USER + 124
|
---|
| 330 | Const EM_SETBIDIOPTIONS = WM_USER + 200
|
---|
| 331 | Const EM_GETBIDIOPTIONS = WM_USER + 201
|
---|
| 332 |
|
---|
| 333 |
|
---|
| 334 |
|
---|
| 335 | '---------------
|
---|
| 336 | ' notifications
|
---|
| 337 | '---------------
|
---|
| 338 |
|
---|
| 339 | Const EN_MSGFILTER = &H0700
|
---|
| 340 | Type MSGFILTER
|
---|
| 341 | nmhdr As NMHDR
|
---|
| 342 | msg As DWord
|
---|
| 343 | wParam As WPARAM
|
---|
| 344 | lParam As LPARAM
|
---|
| 345 | End Type
|
---|
| 346 |
|
---|
[206] | 347 | Type CHARRANGE
|
---|
| 348 | cpMin As Long
|
---|
| 349 | cpMax As Long
|
---|
| 350 | End Type
|
---|
| 351 |
|
---|
| 352 | Type EDITSTREAM
|
---|
[281] | 353 | dwCookie As ULONG_PTR
|
---|
[206] | 354 | dwError As DWord
|
---|
| 355 | pfnCallback As VoidPtr
|
---|
| 356 | End Type
|
---|
| 357 |
|
---|
[1] | 358 | Const EN_REQUESTRESIZE = &H0701
|
---|
| 359 | Const EN_SELCHANGE = &H0702
|
---|
| 360 | Const EN_DROPFILES = &H0703
|
---|
| 361 | Const EN_PROTECTED = &H0704
|
---|
| 362 | Const EN_CORRECTTEXT = &H0705
|
---|
| 363 | Const EN_STOPNOUNDO = &H0706
|
---|
| 364 | Const EN_IMECHANGE = &H0707
|
---|
| 365 | Const EN_SAVECLIPBOARD = &H0708
|
---|
| 366 | Const EN_OLEOPFAILED = &H0709
|
---|
| 367 | Const EN_OBJECTPOSITIONS = &H070a
|
---|
| 368 | Const EN_LINK = &H070b
|
---|
| 369 | Const EN_DRAGDROPDONE = &H070c
|
---|
| 370 | Const EN_ALIGN_LTR = &H0710
|
---|
| 371 | Const EN_ALIGN_RTL = &H0711
|
---|
| 372 |
|
---|
| 373 |
|
---|
| 374 | #endif '_INC_RICHEDIT
|
---|