description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CMFCRibbonLinkCtrl Class |
CMFCRibbonLinkCtrl Class |
11/04/2016 |
|
|
77ae1941-e0ab-4a9d-911e-1752d34c079b |
Implements a hyperlink that is positioned on a ribbon. The hyperlink opens a Web page when you click it. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.
class CMFCRibbonLinkCtrl : public CMFCRibbonButton
Name | Description |
---|---|
CMFCRibbonLinkCtrl::CMFCRibbonLinkCtrl | Constructs and initializes a CMFCRibbonLinkCtrl object. |
Name | Description |
---|---|
CMFCRibbonLinkCtrl::CopyFrom | (Overrides CMFCRibbonButton::CopyFrom .) |
CMFCRibbonLinkCtrl::GetCompactSize | (Overrides CMFCRibbonButton::GetCompactSize.) |
CMFCRibbonLinkCtrl::GetLink | Returns the value of the hyperlink. |
CMFCRibbonLinkCtrl::GetRegularSize | (Overrides CMFCRibbonButton::GetRegularSize.) |
CMFCRibbonLinkCtrl::GetToolTipText | (Overrides CMFCRibbonButton::GetToolTipText.) |
CMFCRibbonLinkCtrl::IsDrawTooltipImage | (Overrides CMFCRibbonButton::IsDrawTooltipImage .) |
CMFCRibbonLinkCtrl::OnDraw | (Overrides CMFCRibbonButton::OnDraw.) |
CMFCRibbonLinkCtrl::OnDrawMenuImage | (Overrides CMFCRibbonBaseElement::OnDrawMenuImage.) |
CMFCRibbonLinkCtrl::OnMouseMove | (Overrides CMFCRibbonButton::OnMouseMove .) |
CMFCRibbonLinkCtrl::OnSetIcon | |
CMFCRibbonLinkCtrl::OpenLink | Opens the Web page specified in the hyperlink. |
CMFCRibbonLinkCtrl::SetLink | Sets the value of the hyperlink. |
After you create a hyperlink, add it to a panel by calling CMFCRibbonPanel::Add.
CObject
└ CMFCRibbonBaseElement
└ CMFCRibbonButton
└ CMFCRibbonLinkCtrl
Header: afxRibbonLinkCtrl.h
Constructs and initializes a CMFCRibbonLinkCtrl object.
CMFCRibbonLinkCtrl(
UINT nID,
LPCTSTR lpszText,
LPCTSTR lpszLink);
nID
[in] Specifies the command ID of the command that executes when the link control is clicked.
lpszText
[in] Specifies the label to display on the link control.
lpszLink
[in] Specifies the hyperlink associated with the link control.
The following example demonstrates how to use the constructor of the CMFCRibbonLinkCtrl
class. This code snippet is part of the Ribbon Gadgets sample.
[!code-cppNVC_MFC_RibbonGadgets#1]
virtual void CopyFrom(const CMFCRibbonBaseElement& src);
[in] src
virtual CSize GetCompactSize(CDC* pDC);
[in] pDC
Returns the value of the hyperlink.
LPCTSTR GetLink() const;
The current value of the hyperlink.
virtual CSize GetRegularSize(CDC* pDC);
[in] pDC
virtual CString GetToolTipText() const;
virtual BOOL OnDrawMenuImage(CDC*, CRect);
[in] CDC*
[in] CRect
virtual BOOL IsDrawTooltipImage() const;
virtual void OnDraw(CDC* pDC);
[in] pDC
virtual void OnMouseMove(CPoint point);
[in] point
virtual void OnSetIcon();
Opens the Web page specified in the hyperlink.
BOOL OpenLink();
TRUE if the associated webpage was opened successfully; otherwise, FALSE.
Opens a webpage using the hyperlink associated with the CMFCRibbonLinkCtrl
object.
Sets the value of the hyperlink.
void SetLink(LPCTSTR lpszLink);
lpszLink
[in] Specifies the hyperlink text.