Solved

EN_LINK documentation?

Posted on 1998-09-14
2
784 Views
Last Modified: 2010-05-18
I am using D3 and can't find documentation for the EN_LINK and CFM_LINK features of the RichEdit control. I can see the declarations in the richedit.pas. Where can I get the details?

Thanks,
Sanjay
0
Comment
Question by:skanade
2 Comments
 
LVL 7

Accepted Solution

by:
BlackMan earned 50 total points
ID: 1339714
MSDN is a good source :-)

---------------------- EN_LINK --------------------
EN_LINK
[This is preliminary documentation and subject to change.]

A rich edit control sends EN_LINK notification messages when it receives various messages, such as mouse click messages, while the mouse pointer is over text that has the CFE_LINK effect. For more information about the CFE_LINK effect, see the following Remarks section.

The parent window of the control receives this notification message through the WM_NOTIFY message.

EN_LINK
idEditCtrl = (int) LOWORD(wParam); // identifier of edit control
pEnlink = (ENLINK *) lParam;       // pointer to ENLINK structure
 
Parameters
idEditCtrl
Identifier of the rich edit control.
pEnlink
Pointer to an ENLINK structure. The structure contains an NMHDR structure, information about the message received by the control, and a CHARRANGE structure that indicates the range of characters that have the CFE_LINK effect.
Return Values
If you return zero, the control proceeds with its normal handling of the message.

If you return a nonzero value, the control does not handle the message.

Remarks
To receive EN_LINK notifications, specify the ENM_LINK flag in the mask sent with the EM_SETEVENTMASK message.

A rich edit control sends EN_LINK notifications when it receives the following messages while the mouse pointer is over text that has the CFE_LINK effect:

WM_LBUTTONDBLCLK
WM_LBUTTONDOWN
WM_LBUTTONUP
WM_MOUSEMOVE
WM_RBUTTONDBLCLK
WM_RBUTTONDOWN
WM_RBUTTONUP
WM_SETCURSOR

The CFE_LINK effect typically identifies a range of text that contains a URL. Applications can handle the EN_LINK notification by changing the mouse pointer when it is over the URL, or by starting a browser to view the location identified by the URL.

Rich Edit 2.0 and later: If you send the EM_AUTOURLDETECT message to enable automatic URL detection, the rich edit control automatically sets the CFE_LINK effect for modified text that it identifies as a URL.

QuickInfo
  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in richedit.h.

See Also
Rich Edit Controls Overview, Rich Edit Notification Messages, CHARRANGE, EM_AUTOURLDETECT, ENLINK, NMHDR

 
------------------------ CFM_LINK -------------------

CHARFORMAT2
[This is preliminary documentation and subject to change.]

The CHARFORMAT2 structure contains information about character formatting in a rich edit control. CHARFORMAT2 is a rich edit 2.0 extension of the CHARFORMAT structure. Rich edit 2.0 allows you to use either structure with the EM_GETCHARFORMAT and EM_SETCHARFORMAT messages.

typedef struct _charformat2 {
    UINT        cbSize;
    _WPAD       _wPad1;
    DWORD       dwMask;
    DWORD       dwEffects;
    LONG        yHeight;
    LONG        yOffset;
    COLORREF    crTextColor;
    BYTE        bCharSet;
    BYTE        bPitchAndFamily;
    WCHAR       szFaceName[LF_FACESIZE];
    _WPAD       _wPad2;
    WORD        wWeight;
    SHORT       sSpacing;
    COLORREF    crBackColor;
    LCID        lcid;
    DWORD       dwReserved;
    SHORT       sStyle;
    WORD        wKerning;
    BYTE        bUnderlineType;
    BYTE        bAnimation;
    BYTE        bRevAuthor;
    BYTE        bReserved1;
} CHARFORMAT2;
 
Members
cbSize
Specifies the size, in bytes, of this structure. Before passing this structure to a rich edit control, set cbSize to the size of the CHARFORMAT or CHARFORMAT2 structure. If cbSize equals the size of a CHARFORMAT structure, the control uses only the CHARFORMAT members.
dwMask
Specifies the parts of the CHARFORMAT2 structure that contain valid information. The dwMask member can be a combination of the values from two sets of bit flags. One set indicates the structure members that are valid. Another set indicates the valid attributes in the dwEffects member.
Set the following values to indicate the valid structure members. Value Meaning
CFM_ANIMATION The bAnimation member is valid.
CFM_BACKCOLOR The crBackColor member is valid.
CFM_CHARSET The bCharSet member is valid.
CFM_COLOR The crTextColor member is valid unless the CFE_AUTOCOLOR flag is set in the dwEffects member.
CFM_FACE The szFaceName member is valid.
CFM_KERNING The wKerning member is valid.
CFM_LCID The lcid member is valid.
CFM_OFFSET The yOffset member is valid.
CFM_REVAUTHOR The bRevAuthor member is valid.
CFM_SIZE The yHeight member is valid.
CFM_SPACING The sSpacing member is valid.
CFM_STYLE The sStyle member is valid.
CFM_UNDERLINETYPE The bUnderlineType member is valid.
CFM_WEIGHT The wWeight member is valid.



Set the following values to indicate the valid attributes of the dwEffects member: Value Meaning
CFM_ALLCAPS The CFE_ALLCAPS value is valid.
CFM_BOLD The CFE_BOLD value is valid.
CFM_COLOR The CFE_AUTOCOLOR value is valid, or the crTextColor member is valid.
CFM_DISABLED The CFE_DISABLED value is valid.
CFM_EMBOSS The CFE_EMBOSS value is valid.
CFM_HIDDEN The CFE_HIDDEN value is valid.
CFM_IMPRINT The CFE_IMPRINT value is valid.
CFM_ITALIC The CFE_ITALIC value is valid.
CFM_LINK The CFE_LINK value is valid.
CFM_OUTLINE The CFE_OUTLINE value is valid.
CFM_PROTECTED The CFE_PROTECTED value is valid.
CFM_REVISED The CFE_REVISION value is valid.
CFM_SHADOW The CFE_SHADOW value is valid.
CFM_SMALLCAPS The CFE_SMALLCAPS value is valid.
CFM_STRIKEOUT The CFE_STRIKEOUT value is valid.
CFM_SUBSCRIPT The CFE_SUBSCRIPT and CFE_SUPERSCRIPT values are valid.
CFM_SUPERSCRIPT Same as CFM_SUBSCRIPT.
CFM_UNDERLINE. The CFE_UNDERLINE value is valid.



dwEffects
A set of bit flags that specify character effects. Some of the flags are included only for compatibility with Microsoft Text Object Model (TOM) interfaces; the rich edit control stores the value but does not use it to display text.
This member can be a combination of the following values. Value Meaning
CFE_ALLCAPS Characters are all capital letters. Does not affect the way the control displays the text.  
CFE_AUTOCOLOR The text color is the return value of GetSysColor (COLOR_WINDOWTEXT). If this flag is set, the crTextColor member is ignored.
CFE_BOLD Characters are bold.
CFE_DELETED Marks the characters as deleted.
CFE_EMBOSS Characters are embossed. Does not affect how the control displays the text.  
CFE_HIDDEN Characters are not displayed. Does not affect how the control displays the text.  
CFE_IMPRINT Characters are displayed as imprinted characters. Does not affect how the control displays the text.  
CFE_ITALIC Characters are italic.
CFE_LINK A rich edit control can send EN_LINK notification messages when it receives mouse messages while the mouse pointer is over text with the CFE_LINK effect.
CFE_OUTLINE Characters are displayed as outlined characters. Does not affect how the control displays the text.  
CFE_PROTECTED Characters are protected; an attempt to modify them will cause an EN_PROTECTED notification message.
CFE_REVISION Marks the characters as revised.
CFE_SHADOW Characters are displayed as shadowed characters. Does not affect how the control displays the text.  
CFE_SMALLCAPS Characters are in small capital letters. Does not affect how the control displays the text.  
CFE_STRIKEOUT Characters are struck out.
CFE_SUBSCRIPT Characters are subscript. The CFE_SUPERSCRIPT and CFE_SUBSCRIPT values are mutually exclusive. For both values, the control automatically calculates an offset and a smaller font size. Alternatively, you can use the yHeight and yOffset members to explicitly specify font size and offset for subscript and superscript characters.
CFE_SUPERSCRIPT Characters are superscript.  
CFE_UNDERLINE Characters are underlined.



yHeight
Specifies the character height, in twips. A twip is 1/1440 of an inch, or 1/20 of a printer's point. To use this member, set the CFM_SIZE flag in the dwMask member.
yOffset
Specifies the character offset, in twips, from the baseline. If this member is positive, the character is a superscript; if it is negative, the character is a subscript. To use this member, set the CFM_OFFSET flag in the dwMask member.
crTextColor
Specifies the text color. To use this member, set the CFM_COLOR flag in the dwMask member. This member is ignored if the CFE_AUTOCOLOR character effect is specified.
bCharSet
Specifies the character set value, which can be one of the values specified for the lfCharSet member of the LOGFONT structure. To use this member, set the CFM_CHARSET flag in the dwMask member.
bPitchAndFamily
Specifies the font family and pitch. This member is the same as the lfPitchAndFamily member of the LOGFONT structure.
szFaceName
A null-terminated character array specifying the font face name. To use this member, set the CFM_FACE flag in the dwMask member.
wWeight
Specifies the font weight. This member is the same as the lfWeight member of the LOGFONT structure. To use this member, set the CFM_WEIGHT flag in the dwMask member.
sSpacing
Specifies the horizontal space, in twips, between letters. This value has no effect on the text displayed by a rich edit control; it is included for compatibility with Microsoft Text Object Model (TOM) interfaces. To use this member, set the CFM_SPACING flag in the dwMask member.
crBackColor
Specifies the background color. To use this member, set the CFM_BACKCOLOR flag in the dwMask member.
lcid
Specifies a 32-bit locale identifier that contains a language identifier in the lower word, and a sorting identifier and reserved value in the upper word. This member has no effect on the text displayed by a rich edit control, but spelling and grammar checkers can use it to deal with language-dependent problems. You can use the MAKELCID macro to create an LCID value. To use this member, set the CFM_LCID flag in the dwMask member.
dwReserved
Reserved; must be zero.
sStyle
Specifies a style handle. This value has no effect on the text displayed by a rich edit control; it is included for compatibility with Microsoft Text Object Model (TOM) interfaces. To use this member, set the CFM_STYLE flag in the dwMask member.
wKerning
Specifies the twip size above which to kern the character. This value has no effect on the text displayed by a rich edit control; it is included for compatibility with TOM interfaces. To use this member, set the CFM_KERNING flag in the dwMask member.
bUnderlineType
Specifies the underline type. To use this member, set the CFM_UNDERLINETYPE flag in the dwMask member. This member can be one of the following values. Value Meaning
CFU_CF1UNDERLINE Map CHARFORMAT's bit underline to CHARFORMAT2.  
CFU_INVERT For IME composition fake a selection.  
CFU_UNDERLINE Solid underline.
CFU_UNDERLINEDOTTED Dotted underlined text. The rich edit control displays the text with a solid underline.
CFU_UNDERLINEDOUBLE Double-underlined text. The rich edit control displays the text with a solid underline.
CFU_UNDERLINENONE No underline. This is the default.
CFU_UNDERLINEWORD Underline words only. The rich edit control displays the text with a solid underline.


bAnimation
Specifies the text animation. This value has no effect on the text displayed by a rich edit control; it is included for compatibility with TOM interfaces. To use this member, set the CFM_ANIMATION flag in the dwMask member.
bRevAuthor
Specifies an index that identifies the author making a revision. The rich edit control uses different text colors for each different author index. To use this member, set the CFM_REVAUTHOR flag in the dwMask member.
bReserved1
Reserved; must be zero.
QuickInfo
  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in richedit.h.
  Unicode: Defined as Unicode and ANSI structures.

See Also
Rich Edit Controls Overview, Rich Edit Structures, CHARFORMAT, EM_GETCHARFORMAT, EM_SETCHARFORMAT, EN_PROTECTED, GetSysColor, LOGFONT, MAKELCID

 

0
 

Author Comment

by:skanade
ID: 1339715
Thanks!

Sanjay
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now