Skip to content

Latest commit

 

History

History
256 lines (179 loc) · 7.25 KB

File metadata and controls

256 lines (179 loc) · 7.25 KB
title CMFCRibbonLinkCtrl Class | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic reference
f1_keywords
CMFCRibbonLinkCtrl
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::CMFCRibbonLinkCtrl
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::CopyFrom
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::GetCompactSize
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::GetLink
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::GetRegularSize
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::GetToolTipText
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::IsDrawTooltipImage
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::OnDraw
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::OnDrawMenuImage
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::OnMouseMove
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::OnSetIcon
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::OpenLink
AFXRIBBONLINKCTRL/CMFCRibbonLinkCtrl::SetLink
dev_langs
C++
helpviewer_keywords
CMFCRibbonLinkCtrl class
ms.assetid 77ae1941-e0ab-4a9d-911e-1752d34c079b
caps.latest.revision 22
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

CMFCRibbonLinkCtrl Class

Implements a hyperlink that is positioned on a ribbon. The hyperlink opens a Web page when you click it.
[!INCLUDEcpp_fp_under_construction]

Syntax

class CMFCRibbonLinkCtrl : public CMFCRibbonButton  

Members

Public Constructors

Name Description
CMFCRibbonLinkCtrl::CMFCRibbonLinkCtrl Constructs and initializes a CMFCRibbonLinkCtrl object.

Public Methods

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.

Remarks

After you create a hyperlink, add it to a panel by calling CMFCRibbonPanel::Add.

Inheritance Hierarchy

CObject CMFCRibbonBaseElement

CMFCRibbonButton CMFCRibbonLinkCtrl

Requirements

Header: afxRibbonLinkCtrl.h

CMFCRibbonLinkCtrl::CMFCRibbonLinkCtrl

Constructs and initializes a CMFCRibbonLinkCtrl object.

CMFCRibbonLinkCtrl(
    UINT nID,  
    LPCTSTR lpszText,  
    LPCTSTR lpszLink);

Parameters

[in] nID
Specifies the command ID of the command that executes when the link control is clicked.

[in] lpszText
Specifies the label to display on the link control.

[in] lpszLink
Specifies the hyperlink associated with the link control.

Example

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]

CMFCRibbonLinkCtrl::CopyFrom

virtual void CopyFrom(const CMFCRibbonBaseElement& src);

Parameters

[in] src

Remarks

CMFCRibbonLinkCtrl::GetCompactSize

virtual CSize GetCompactSize(CDC* pDC);

Parameters

[in] pDC

Return Value

Remarks

CMFCRibbonLinkCtrl::GetLink

Returns the value of the hyperlink.

LPCTSTR GetLink() const;  

Return Value

The current value of the hyperlink.

Remarks

CMFCRibbonLinkCtrl::GetRegularSize

virtual CSize GetRegularSize(CDC* pDC);

Parameters

[in] pDC

Return Value

Remarks

CMFCRibbonLinkCtrl::GetToolTipText

virtual CString GetToolTipText() const;  

Return Value

Remarks

CMFCRibbonLinkCtrl::OnDrawMenuImage

virtual BOOL OnDrawMenuImage(CDC*, CRect);

Parameters

[in] CDC*
[in] CRect

Return Value

Remarks

CMFCRibbonLinkCtrl::IsDrawTooltipImage

virtual BOOL IsDrawTooltipImage() const;  

Return Value

Remarks

CMFCRibbonLinkCtrl::OnDraw

virtual void OnDraw(CDC* pDC);

Parameters

[in] pDC

Remarks

CMFCRibbonLinkCtrl::OnMouseMove

virtual void OnMouseMove(CPoint point);

Parameters

[in] point

Remarks

CMFCRibbonLinkCtrl::OnSetIcon

virtual void OnSetIcon();

Remarks

CMFCRibbonLinkCtrl::OpenLink

Opens the Web page specified in the hyperlink.

BOOL OpenLink();

Return Value

TRUE if the associated Web page was opened successfully; otherwise, FALSE.

Remarks

Opens a web page using the hyperlink associated with the CMFCRibbonLinkCtrl object.

CMFCRibbonLinkCtrl::SetLink

Sets the value of the hyperlink.

void SetLink(LPCTSTR lpszLink);

Parameters

[in] lpszLink
Specifies the hyperlink text.

See Also

Hierarchy Chart
Classes
CMFCRibbonButton Class