📄 richedit.h
字号:
#define CFE_IMPRINT CFM_IMPRINT
#define CFE_DISABLED CFM_DISABLED
#define CFE_REVISED CFM_REVISED
/* NOTE: CFE_AUTOCOLOR and CFE_AUTOBACKCOLOR correspond to CFM_COLOR and
CFM_BACKCOLOR, respectively, which control them */
#define CFE_AUTOBACKCOLOR CFM_BACKCOLOR
/* Underline types. RE 1.0 displays only CFU_UNDERLINE */
#define CFU_CF1UNDERLINE 0xFF /* map charformat's bit underline to CF2.*/
#define CFU_INVERT 0xFE /* For IME composition fake a selection.*/
#define CFU_UNDERLINEHAIRLINE 10 /* (*) displayed as ordinary underline */
#define CFU_UNDERLINETHICK 9
#define CFU_UNDERLINEWAVE 8
#define CFU_UNDERLINEDASHDOTDOT 7
#define CFU_UNDERLINEDASHDOT 6
#define CFU_UNDERLINEDASH 5
#define CFU_UNDERLINEDOTTED 4
#define CFU_UNDERLINEDOUBLE 3 /* (*) displayed as ordinary underline */
#define CFU_UNDERLINEWORD 2 /* (*) displayed as ordinary underline */
#define CFU_UNDERLINE 1
#define CFU_UNDERLINENONE 0
#ifdef __cplusplus
struct PARAFORMAT2 : _paraformat
{
LONG dySpaceBefore; /* Vertical spacing before para */
LONG dySpaceAfter; /* Vertical spacing after para */
LONG dyLineSpacing; /* Line spacing depending on Rule */
SHORT sStyle; /* Style handle */
BYTE bLineSpacingRule; /* Rule for line spacing (see tom.doc) */
BYTE bOutlineLevel; /* Outline level */
WORD wShadingWeight; /* Shading in hundredths of a per cent */
WORD wShadingStyle; /* Nibble 0: style, 1: cfpat, 2: cbpat */
WORD wNumberingStart; /* Starting value for numbering */
WORD wNumberingStyle; /* Alignment, roman/arabic, (), ), ., etc.*/
WORD wNumberingTab; /* Space bet FirstIndent & 1st-line text*/
WORD wBorderSpace; /* Border-text spaces (nbl/bdr in pts) */
WORD wBorderWidth; /* Pen widths (nbl/bdr in half pts) */
WORD wBorders; /* Border styles (nibble/border) */
};
#else /* regular C-style */
typedef struct _paraformat2
{
UINT cbSize;
DWORD dwMask;
WORD wNumbering;
WORD wReserved;
LONG dxStartIndent;
LONG dxRightIndent;
LONG dxOffset;
WORD wAlignment;
SHORT cTabCount;
LONG rgxTabs[MAX_TAB_STOPS];
LONG dySpaceBefore; /* Vertical spacing before para */
LONG dySpaceAfter; /* Vertical spacing after para */
LONG dyLineSpacing; /* Line spacing depending on Rule */
SHORT sStyle; /* Style handle */
BYTE bLineSpacingRule; /* Rule for line spacing (see tom.doc) */
BYTE bOutlineLevel; /* Outline Level */
WORD wShadingWeight; /* Shading in hundredths of a per cent */
WORD wShadingStyle; /* Byte 0: style, nib 2: cfpat, 3: cbpat*/
WORD wNumberingStart; /* Starting value for numbering */
WORD wNumberingStyle; /* Alignment, Roman/Arabic, (), ), ., etc.*/
WORD wNumberingTab; /* Space bet 1st indent and 1st-line text*/
WORD wBorderSpace; /* Border-text spaces (nbl/bdr in pts) */
WORD wBorderWidth; /* Pen widths (nbl/bdr in half twips) */
WORD wBorders; /* Border styles (nibble/border) */
} PARAFORMAT2;
#endif /* C++ */
/* PARAFORMAT 2.0 masks and effects */
#define PFM_SPACEBEFORE 0x00000040
#define PFM_SPACEAFTER 0x00000080
#define PFM_LINESPACING 0x00000100
#define PFM_STYLE 0x00000400
#define PFM_BORDER 0x00000800 /* (*) */
#define PFM_SHADING 0x00001000 /* (*) */
#define PFM_NUMBERINGSTYLE 0x00002000 /* RE 3.0 */
#define PFM_NUMBERINGTAB 0x00004000 /* RE 3.0 */
#define PFM_NUMBERINGSTART 0x00008000 /* RE 3.0 */
#define PFM_RTLPARA 0x00010000
#define PFM_KEEP 0x00020000 /* (*) */
#define PFM_KEEPNEXT 0x00040000 /* (*) */
#define PFM_PAGEBREAKBEFORE 0x00080000 /* (*) */
#define PFM_NOLINENUMBER 0x00100000 /* (*) */
#define PFM_NOWIDOWCONTROL 0x00200000 /* (*) */
#define PFM_DONOTHYPHEN 0x00400000 /* (*) */
#define PFM_SIDEBYSIDE 0x00800000 /* (*) */
#define PFM_TABLE 0x40000000 /* RE 3.0 */
// The following three properties are read only
#define PFM_COLLAPSED 0x01000000 /* RE 3.0 */
#define PFM_OUTLINELEVEL 0x02000000 /* RE 3.0 */
#define PFM_BOX 0x04000000 /* RE 3.0 */
/* Note: PARAFORMAT has no effects */
#define PFM_EFFECTS (PFM_RTLPARA | PFM_KEEP | PFM_KEEPNEXT | PFM_TABLE \
| PFM_PAGEBREAKBEFORE | PFM_NOLINENUMBER \
| PFM_NOWIDOWCONTROL | PFM_DONOTHYPHEN | PFM_SIDEBYSIDE \
| PFM_TABLE)
#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)
#define PFE_RTLPARA (PFM_RTLPARA >> 16)
#define PFE_KEEP (PFM_KEEP >> 16) /* (*) */
#define PFE_KEEPNEXT (PFM_KEEPNEXT >> 16) /* (*) */
#define PFE_PAGEBREAKBEFORE (PFM_PAGEBREAKBEFORE >> 16) /* (*) */
#define PFE_NOLINENUMBER (PFM_NOLINENUMBER >> 16) /* (*) */
#define PFE_NOWIDOWCONTROL (PFM_NOWIDOWCONTROL >> 16) /* (*) */
#define PFE_DONOTHYPHEN (PFM_DONOTHYPHEN >> 16) /* (*) */
#define PFE_SIDEBYSIDE (PFM_SIDEBYSIDE >> 16) /* (*) */
// The following four effects are read only
#define PFE_OUTLINELEVEL (PFM_OUTLINELEVEL >> 16) /* (+) */
#define PFE_COLLAPSED (PFM_COLLAPSED >> 16) /* (+) */
#define PFE_BOX (PFM_BOX >> 16) /* (+) */
#define PFE_TABLE 0x4000 /* Para is a table row. RE 3.0 */
/* PARAFORMAT2 wNumbering options (see also PFN_BULLET) */
#define PFN_ARABIC 2 /* tomListNumberAsArabic: 0, 1, 2, ...*/
#define PFN_LCLETTER 3 /* tomListNumberAsLCLetter: a, b, c, ...*/
#define PFN_UCLETTER 4 /* tomListNumberAsUCLetter: A, B, C, ...*/
#define PFN_LCROMAN 5 /* tomListNumberAsLCRoman: i, ii, iii, ...*/
#define PFN_UCROMAN 6 /* tomListNumberAsUCRoman: I, II, III, ...*/
/* PARAFORMAT2 wNumberingStyle options */
#define PFNS_PAREN 0x000 /* default, e.g., 1) */
#define PFNS_PARENS 0x100 /* tomListParentheses/256, e.g., (1) */
#define PFNS_PERIOD 0x200 /* tomListPeriod/256, e.g., 1. */
#define PFNS_PLAIN 0x300 /* tomListPlain/256, e.g., 1 */
#define PFNS_NONUMBER 0x400 /* Used for continuation w/o number */
#define PFA_JUSTIFY 4 /* New paragraph-alignment option 2.0 (*) */
#define PFA_FULL_INTERWORD 4
#define PFA_FULL_INTERLETTER 5
#define PFA_FULL_SCALED 6
#define PFA_FULL_GLYPHS 7
#define PFA_SNAP_GRID 8
/* Notification structures */
#ifndef WM_NOTIFY
#define WM_NOTIFY 0x004E
typedef struct _nmhdr
{
HWND hwndFrom;
UINT idFrom;
UINT code;
} NMHDR;
#endif /* !WM_NOTIFY */
typedef struct _msgfilter
{
NMHDR nmhdr;
UINT msg;
WPARAM wParam;
LPARAM lParam;
} MSGFILTER;
typedef struct _reqresize
{
NMHDR nmhdr;
RECT rc;
} REQRESIZE;
typedef struct _selchange
{
NMHDR nmhdr;
CHARRANGE chrg;
WORD seltyp;
} SELCHANGE;
#define SEL_EMPTY 0x0000
#define SEL_TEXT 0x0001
#define SEL_OBJECT 0x0002
#define SEL_MULTICHAR 0x0004
#define SEL_MULTIOBJECT 0x0008
/* Used with IRichEditOleCallback::GetContextMenu, this flag will be
passed as a "selection type". It indicates that a context menu for
a right-mouse drag drop should be generated. The IOleObject parameter
will really be the IDataObject for the drop
*/
#define GCM_RIGHTMOUSEDROP 0x8000
typedef struct _endropfiles
{
NMHDR nmhdr;
HANDLE hDrop;
LONG cp;
BOOL fProtected;
} ENDROPFILES;
typedef struct _enprotected
{
NMHDR nmhdr;
UINT msg;
WPARAM wParam;
LPARAM lParam;
CHARRANGE chrg;
} ENPROTECTED;
typedef struct _ensaveclipboard
{
NMHDR nmhdr;
LONG cObjectCount;
LONG cch;
} ENSAVECLIPBOARD;
#ifndef MACPORT
typedef struct _enoleopfailed
{
NMHDR nmhdr;
LONG iob;
LONG lOper;
HRESULT hr;
} ENOLEOPFAILED;
#endif
#define OLEOP_DOVERB 1
typedef struct _objectpositions
{
NMHDR nmhdr;
LONG cObjectCount;
LONG *pcpPositions;
} OBJECTPOSITIONS;
typedef struct _enlink
{
NMHDR nmhdr;
UINT msg;
WPARAM wParam;
LPARAM lParam;
CHARRANGE chrg;
} ENLINK;
/* PenWin specific */
typedef struct _encorrecttext
{
NMHDR nmhdr;
CHARRANGE chrg;
WORD seltyp;
} ENCORRECTTEXT;
/* Far East specific */
typedef struct _punctuation
{
UINT iSize;
LPSTR szPunctuation;
} PUNCTUATION;
/* Far East specific */
typedef struct _compcolor
{
COLORREF crText;
COLORREF crBackground;
DWORD dwEffects;
}COMPCOLOR;
/* Clipboard formats - use as parameter to RegisterClipboardFormat() */
#define CF_RTF TEXT("Rich Text Format")
#define CF_RTFNOOBJS TEXT("Rich Text Format Without Objects")
#define CF_RETEXTOBJ TEXT("RichEdit Text and Objects")
/* Paste Special */
typedef struct _repastespecial
{
DWORD dwAspect;
DWORD_PTR dwParam;
} REPASTESPECIAL;
/* UndoName info */
typedef enum _undonameid
{
UID_UNKNOWN = 0,
UID_TYPING = 1,
UID_DELETE = 2,
UID_DRAGDROP = 3,
UID_CUT = 4,
UID_PASTE = 5
} UNDONAMEID;
/* Flags for the SETEXTEX data structure */
#define ST_DEFAULT 0
#define ST_KEEPUNDO 1
#define ST_SELECTION 2
/* EM_SETTEXTEX info; this struct is passed in the wparam of the message */
typedef struct _settextex
{
DWORD flags; /* flags (see the ST_XXX defines */
UINT codepage; /* code page for translation (CP_ACP for sys default;
1200 for Unicode, -1 for control default */
} SETTEXTEX;
/* Flags for the GETEXTEX data structure */
#define GT_DEFAULT 0
#define GT_USECRLF 1
#define GT_SELECTION 2
/* EM_GETTEXTEX info; this struct is passed in the wparam of the message */
typedef struct _gettextex
{
DWORD cb; /* count of bytes in the string */
DWORD flags; /* flags (see the GT_XXX defines */
UINT codepage; /* code page for translation (CP_ACP for sys default,
1200 for Unicode, -1 for control default */
LPCSTR lpDefaultChar; /* replacement for unmappable chars */
LPBOOL lpUsedDefChar; /* pointer to flag set when def char used */
} GETTEXTEX;
/* Flags for the GETTEXTLENGTHEX data structure */
#define GTL_DEFAULT 0 /* do the default (return # of chars) */
#define GTL_USECRLF 1 /* compute answer using CRLFs for paragraphs*/
#define GTL_PRECISE 2 /* compute a precise answer */
#define GTL_CLOSE 4 /* fast computation of a "close" answer */
#define GTL_NUMCHARS 8 /* return the number of characters */
#define GTL_NUMBYTES 16 /* return the number of _bytes_ */
/* EM_GETTEXTLENGTHEX info; this struct is passed in the wparam of the msg */
typedef struct _gettextlengthex
{
DWORD flags; /* flags (see GTL_XXX defines) */
UINT codepage; /* code page for translation (CP_ACP for default,
1200 for Unicode */
} GETTEXTLENGTHEX;
/* BiDi specific features */
typedef struct _bidioptions
{
UINT cbSize;
WORD wMask;
WORD wEffects;
} BIDIOPTIONS;
/* BIDIOPTIONS masks */
#if (_RICHEDIT_VER == 0x0100)
#define BOM_DEFPARADIR 0x0001 /* Default paragraph direction (implies alignment) (obsolete) */
#define BOM_PLAINTEXT 0x0002 /* Use plain text layout (obsolete) */
#endif /* _RICHEDIT_VER == 0x0100 */
#define BOM_NEUTRALOVERRIDE 0x0004 /* Override neutral layout (obsolete) */
#define BOM_CONTEXTREADING 0x0008 /* Context reading order */
#define BOM_CONTEXTALIGNMENT 0x0010 /* Context alignment */
/* BIDIOPTIONS effects */
#if (_RICHEDIT_VER == 0x0100)
#define BOE_RTLDIR 0x0001 /* Default paragraph direction (implies alignment) (obsolete) */
#define BOE_PLAINTEXT 0x0002 /* Use plain text layout (obsolete) */
#endif /* _RICHEDIT_VER == 0x0100 */
#define BOE_NEUTRALOVERRIDE 0x0004 /* Override neutral layout (obsolete) */
#define BOE_CONTEXTREADING 0x0008 /* Context reading order */
#define BOE_CONTEXTALIGNMENT 0x0010 /* Context alignment */
/* Additional EM_FINDTEXT[EX] flags */
#define FR_MATCHDIAC 0x20000000
#define FR_MATCHKASHIDA 0x40000000
#define FR_MATCHALEFHAMZA 0x80000000
/* UNICODE embedding character */
#ifndef WCH_EMBEDDING
#define WCH_EMBEDDING (WCHAR)0xFFFC
#endif /* WCH_EMBEDDING */
#ifdef _WIN32
#include <poppack.h>
#elif !defined(RC_INVOKED)
#pragma pack()
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#pragma option pop /*P_O_Pop*/
#endif /* !_RICHEDIT_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -