这段代码是什么意思?
#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);
} 展开
#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);
} 展开
1个回答
展开全部
#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的析构函数,回收内存资源
#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的析构函数,回收内存资源
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询