SECRichHyperlink Class

class SECRichHyperlink: public CWindowImpl

SECRichHyperlink

Defined in: SECRichHyperLink.h

Comments

The SECRichHyperlink class is a browser independent class for providing a simple link to a registered internet resource. The most common sorts of resources are web resources (HTTP://xxxx.yyy.zzz), email resources (mailto:someone@somewhere.com) and ftp resources. This differs from the SECHyperlink class in that it superclasses a rich edit control and thereby makes use of the rich edit's enhanced display/formatting capabilities for the text. SECRichHyperlink allows there to be a subset of the text that contains the link. This control supports one link in a given string.

Usage of this class can be done by either calling the create function or by attaching the SECRichHyperlink control to an existing control located on a dialog. Using the existing control simplifies layout by allowing the resource editor to be used to position the control.

Class Members

SECRichHyperlink()

Constructor

BOOL  Create(HWND hParentWnd, RECT& rect, UINT nID, LPCTSTR lpszWindowName = NULL, DWORD dwStyle = WS_CHILD|WS_VISIBLE)

Creates the child window for the hyperlink and attaches it to it's parent window.

BOOL  AttachHyperlink( HWND hParentWnd, UINT nID, DWORD dwStyle = WS_CHILD|WS_VISIBLE)

Attaches the hyperlink to an existing control specified in a dialog resource.

virtual void  SetHyperlink(const TCHAR* lpStrLink)

Sets the string that will control the action to be taken

virtual const TCHAR*  GetHyperlink()

Returns the hyperlink string

virtual void  SetLinkVerb(const TCHAR* lpStrVerb)

Sets a verb that specifies the action to be taken

virtual const TCHAR*  GetLinkVerb()

Returns the verb specifying an action for the link

virtual void  SetLinkParams(const TCHAR* lpStrParams)

Sets the shell execution parameters

virtual const TCHAR*  GetLinkParams()

Returns the shell execution parameters

virtual void  SetLinkDefDir(const TCHAR* lpStrDefDir)

Sets the default directory for executing the link

virtual const TCHAR*  GetLinkDefDir()

Returns the default directory for the link execution

virtual void  SetLinkShowCmd(int nShowCmd)

Sets the flags specifying the initial display state for the application

virtual int  GetLinkShowCmd()

Returns the application display flags

virtual void  SetDisplayText(const TCHAR* lpStrDisplayText)

Sets the string that will be shown to the end user

virtual const TCHAR*  GetDisplayText()

Returns the display text string

virtual void  SetClrBkgnd(COLORREF clrBkgnd)

Sets the background color for the control

virtual COLORREF  GetClrBkgnd()

Returns the background color

virtual void  SetClrDispTextNormal(COLORREF clrNormal)

Sets the color that will be used for the link when it has not been accessed

virtual COLORREF  GetClrDispTextNormal()

Returns the color for the string when it has not been accessed

virtual void  SetClrDispTextHotTrack(COLORREF clrHotTrack)

Sets the color for the string when the mouse is over it

virtual COLORREF  GetClrDispTextHotTrack()

Returns the color for the string when the mouse is over it

virtual void  SetClrDispTextVisited(COLORREF clrVisited)

Sets the color for the string after it has been accessed

virtual COLORREF  GetClrDispTextVisited()

Returns the color for the string after it has been accessed

virtual void  SetVisited(BOOL bVisited)

Sets the link to it's visited state

virtual BOOL  GetVisited()

Returns TRUE if the link has been clicked on or set to the visited state

virtual void  SetUserFont(HFONT hUserFont)

Changes the display font to the one pointed to

virtual HFONT  GetUserFont()

Returns a handle to the specified font. NULL if no font has been specified.

virtual void  SetUserCursor(HCURSOR hUserCursor)

Allows a different cursor to be shown when the mouse is over the hyperlink

virtual HCURSOR  GetUserCursor()

Returns a handle to the cursor being shown when the mouse is over the hyperlink

virtual void  SetColdCursor(HCURSOR hColdCursor)

Allows a different cursor to be shown when the mouse is over the cold portion of the hyperlink

virtual HCURSOR  GetColdCursor()

Returns a handle to the cursor being shown when the mouse is over the cold portion of the hyperlink

virtual void  SizeToText(BOOL bReSize = TRUE)

Sets the size of the hyperlink window to exactly the size of the display text if TRUE.

virtual BOOL  GetSizeToText()

Returns TRUE if the hyperlink window will be resized to fit the display text

virtual void  ExecuteLink(BOOL bExecute = TRUE)

Allows the automatic execution of a hyperlind to be inhibited. Set to FALSE to inhibit execution.

virtual BOOL  GetExecuteLink()

Returns a BOOL indicating if the link will automaticly execute