这段代码是什么意思?

#include"stdafx.h"#include"HyperLink.h"#ifdef_DEBUG#definenewDEBUG_NEW#undefTHIS_FILE... #include "stdafx.h"
#include "HyperLink.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

#define TOOLTIP_ID 1

BEGIN_MESSAGE_MAP(CHyperLink, CStatic)
//{{AFX_MSG_MAP(CHyperLink)
ON_CONTROL_REFLECT(STN_CLICKED, OnClicked)
ON_WM_CTLCOLOR_REFLECT()
ON_WM_TIMER()
ON_WM_SETCURSOR()
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CHyperLink

CHyperLink::CHyperLink()
{
m_hLinkCursor = NULL; // No cursor as yet
m_crLinkColor = RGB( 0, 0, 255); // Blue
m_crVisitedColor = RGB( 85, 26, 139); // Purple
m_crHoverColor = RGB( 255, 0, 0); // Red
m_bOverControl = FALSE; // Cursor not yet over control
m_bVisited = FALSE; // Hasn't been visited yet.
m_bUnderline = TRUE; // Underline the link?
m_bAdjustToFit = TRUE; // Resize the window to fit the text?
m_strURL.Empty();
}

CHyperLink::~CHyperLink()
{
m_Font.DeleteObject();
if (m_hLinkCursor)
DestroyCursor(m_hLinkCursor);
}
展开
 我来答
Anvilmar
2009-05-18 · TA获得超过108个赞
知道答主
回答量:56
采纳率:0%
帮助的人:0
展开全部
#include "stdafx.h"
#include "HyperLink.h"
头文件包含

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
DEBUG模式判断

BEGIN_MESSAGE_MAP(CHyperLink, CStatic)
//{{AFX_MSG_MAP(CHyperLink)
ON_CONTROL_REFLECT(STN_CLICKED, OnClicked)
ON_WM_CTLCOLOR_REFLECT()
ON_WM_TIMER()
ON_WM_SETCURSOR()
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
消息映射宏

CHyperLink::CHyperLink()
{
m_hLinkCursor = NULL; // No cursor as yet
m_crLinkColor = RGB( 0, 0, 255); // Blue
m_crVisitedColor = RGB( 85, 26, 139); // Purple
m_crHoverColor = RGB( 255, 0, 0); // Red
m_bOverControl = FALSE; // Cursor not yet over control
m_bVisited = FALSE; // Hasn't been visited yet.
m_bUnderline = TRUE; // Underline the link?
m_bAdjustToFit = TRUE; // Resize the window to fit the text?
m_strURL.Empty();
}
类CHyperLink的构造函数,初始化一些类变量

CHyperLink::~CHyperLink()
{
m_Font.DeleteObject();
if (m_hLinkCursor)
DestroyCursor(m_hLinkCursor);
}
类CHyperLink的析构函数,回收内存资源
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式