Objective Toolkit : Chapter 26 The Hyperlink Classes : Customizing the Hyperlink Control
Customizing the Hyperlink Control
The visual attributes of the control such as the display text color, font, cursor, and so on, can be set using methods implemented by the SECHyperlink and SECRichHyperlink classes. The following excerpt illustrates using some of these functions.
 
// Sets the display text color for a link that
// is yet to be accessed.
m_richHyperlink.SetClrDispTextNormal(RGB(0,255,0));
 
// Sets the color for the hot-text portion of the display text.
m_richHyperlink.SetClrDispTextHotTrack(RGB(255,0,0));
 
// Sets the color for a link that has been visited.
if( m_richHyperlink.GetClrDispTextVisited() != RGB(0,125,125) )
m_richHyperlink.SetClrDispTextVisited(RGB(0,125,125));
 
// Sets the cursor displayed when the mouse is over the
// hyperlink text.
HCURSOR hCurArrow = LoadCursor(_Module.GetModuleInstance(),
MAKEINTRESOURCE(IDC_CUR_ARROW));
m_richHyperlink.SetUserCursor(hCurArrow);