Garmin Fleet Management Controller  2.19.0
CStaticLink Class Reference

Static hyperlink control. More...

#include <CStaticLink.h>

+ Inheritance diagram for CStaticLink:

Public Member Functions

 CStaticLink ()
 Constructor. More...
 

Public Attributes

BOOL mIsVisited
 whether visited or not More...
 
CString mLinkText
 URL/filename for non-text controls (e.g., icon, bitmap) More...
 
COLORREF mUnvisitedColor
 color for unvisited More...
 
COLORREF mVisitedColor
 color for visited More...
 

Protected Member Functions

afx_msg HBRUSH CtlColor (CDC *aDC, UINT aCtlColor)
 Handle reflected WM_CTLCOLOR to set custom control color. More...
 
afx_msg void OnClicked ()
 Handle mouse click; open the link. More...
 

Protected Attributes

CFont mFont
 underline font for text control More...
 

Detailed Description

Static hyperlink control.

CStaticLink implements a static control that's a hyperlink to any file on your desktop or web. You can use it in dialog boxes to create hyperlinks to web sites. When clicked, opens the file/URL.

Definition at line 16 of file CStaticLink.h.

Constructor & Destructor Documentation

CStaticLink::CStaticLink ( )

Constructor.

Sets the default colors to use (unvisited: blue, visited: purple) and initializes the link as unvisited.

Definition at line 24 of file CStaticLink.cpp.

References CtlColor(), and FALSE.

Member Function Documentation

afx_msg HBRUSH CStaticLink::CtlColor ( CDC *  aDC,
UINT  aCtlColor 
)
protected

Handle reflected WM_CTLCOLOR to set custom control color.

For a text control, use visited/unvisited colors and underline font. For non-text controls, do nothing. Also ensures SS_NOTIFY is on.

Parameters
aDCContains a pointer to the display context for the child window.
aCtlColorSpecifies the type of control.
Returns
A handle to the brush that is to be used for painting the control background.
Note
For more information, see CWnd::OnCtlColor and the ON_WM_CTLCOLOR_REFLECT macro, both in the MSDN Library.

Definition at line 45 of file CStaticLink.cpp.

References TRUE.

Referenced by CStaticLink().

void CStaticLink::OnClicked ( )
protected

Handle mouse click; open the link.

Definition at line 87 of file CStaticLink.cpp.

References mIsVisited, mLinkText, and TRUE.

Member Data Documentation

CFont CStaticLink::mFont
protected

underline font for text control

Definition at line 35 of file CStaticLink.h.

BOOL CStaticLink::mIsVisited

whether visited or not

Definition at line 27 of file CStaticLink.h.

Referenced by OnClicked().

CString CStaticLink::mLinkText

URL/filename for non-text controls (e.g., icon, bitmap)

Link text to use. If you don't set this, CStaticLink will use GetWindowText to get the link.

Definition at line 32 of file CStaticLink.h.

Referenced by OnClicked().

COLORREF CStaticLink::mUnvisitedColor

color for unvisited

Definition at line 25 of file CStaticLink.h.

COLORREF CStaticLink::mVisitedColor

color for visited

Definition at line 26 of file CStaticLink.h.


The documentation for this class was generated from the following files: