📄 richedit.h
字号:
BYTE bLineSpacingRule; /* Rule for line spacing (see tom.doc) */
BYTE bCRC; /* Reserved for CRC for rapid searching */
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 and 1st-line text*/
WORD wBorderSpace; /* Space between border and text (twips)*/
WORD wBorderWidth; /* Border pen width (twips) */
WORD wBorders; /* Byte 0: bits specify which borders */
/* Nibble 2: border style, 3: color index*/
};
#else /* regular C-style */
typedef struct _paraformat2
{
UINT cbSize;
_WPAD _wPad1;
DWORD dwMask;
WORD wNumbering;
#if (_RICHEDIT_VER >= 0x0210)
WORD wEffects;
#else
WORD wReserved;
#endif /* _RICHEDIT_VER >= 0x0210 */
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 bCRC; /* Reserved for CRC for rapid searching */
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 1st indent and 1st-line text*/
WORD wBorderSpace; /* Space between border and text (twips)*/
WORD wBorderWidth; /* Border pen width (twips) */
WORD wBorders; /* Byte 0: bits specify which borders */
/* Nibble 2: border style, 3: color index*/
} 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 /* (*) */
#define PFM_NUMBERINGTAB 0x00004000 /* (*) */
#define PFM_NUMBERINGSTART 0x00008000 /* (*) */
#define PFM_DIR 0x00010000
#define PFM_RTLPARA 0x00010000 /* (Version 1.0 flag) */
#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 0xc0000000 /* (*) */
/* Note: PARAFORMAT has no effects */
#define PFM_EFFECTS (PFM_DIR | 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_DIR >> 16)
#define PFE_RTLPAR (PFM_RTLPARA >> 16) /* (Version 1.0 flag) */
#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) /* (*) */
#define PFE_TABLEROW 0xc000 /* These 3 options are mutually */
#define PFE_TABLECELLEND 0x8000 /* exclusive and each imply */
#define PFE_TABLECELL 0x4000 /* that para is part of a table*/
/*
* PARAFORMAT numbering options (values for wNumbering):
*
* Numbering Type Value Meaning
* tomNoNumbering 0 Turn off paragraph numbering
* tomNumberAsLCLetter 1 a, b, c, ...
* tomNumberAsUCLetter 2 A, B, C, ...
* tomNumberAsLCRoman 3 i, ii, iii, ...
* tomNumberAsUCRoman 4 I, II, III, ...
* tomNumberAsSymbols 5 default is bullet
* tomNumberAsNumber 6 0, 1, 2, ...
* tomNumberAsSequence 7 tomNumberingStart is first Unicode to use
*
* Other valid Unicode chars are Unicodes for bullets.
*/
#define PFA_JUSTIFY 4 /* New paragraph-alignment option 2.0 (*)
/* notification structures */
#ifndef WM_NOTIFY
#define WM_NOTIFY 0x004E
typedef struct _nmhdr
{
HWND hwndFrom;
_WPAD _wPad1;
UINT idFrom;
_WPAD _wPad2;
UINT code;
_WPAD _wPad3;
} NMHDR;
#endif /* !WM_NOTIFY */
typedef struct _msgfilter
{
NMHDR nmhdr;
UINT msg;
_WPAD _wPad1;
WPARAM wParam;
_WPAD _wPad2;
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;
_WPAD _wPad1;
WPARAM wParam;
_WPAD _wPad2;
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;
_WPAD _wPad1;
WPARAM wParam;
_WPAD _wPad2;
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 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 GETEXTEX data structure */
#define GT_DEFAULT 0
#define GT_USECRLF 1
/* 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 default,
1200 for Unicode */
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;
_WPAD _wPad1;
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) */
#define BOM_NEUTRALOVERRIDE 0x0004 /* Override neutral layout (obsolete) */
#endif /* _RICHEDIT_VER == 0x0100 */
#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) */
#define BOE_NEUTRALOVERRIDE 0x0004 /* Override neutral layout (obsolete) */
#endif /* _RICHEDIT_VER == 0x0100 */
#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 */
#undef _WPAD
#ifdef _WIN32
#include <poppack.h>
#elif !defined(RC_INVOKED)
#pragma pack()
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* !_RICHEDIT_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -