⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myabout.cpp

📁 一个超级记事本程序 SuperNote SuperNote SuperNote
💻 CPP
字号:
// MyAbout.cpp : implementation file
//

#include "stdafx.h"
#include "SuperNote.h"
#include "MyAbout.h"

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

/////////////////////////////////////////////////////////////////////////////
// MyAbout dialog


MyAbout::MyAbout(CWnd* pParent /*=NULL*/)
	: CDialog(MyAbout::IDD, pParent)
{
	//{{AFX_DATA_INIT(MyAbout)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void MyAbout::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(MyAbout)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(MyAbout, CDialog)
	//{{AFX_MSG_MAP(MyAbout)
	ON_WM_MOUSEMOVE()
	ON_WM_LBUTTONDOWN()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// MyAbout message handlers

BOOL MyAbout::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	GetDlgItem(IDC_HOMEPAGE)->GetWindowRect(&m_pRectLink);
	GetDlgItem(IDC_MAILTO)->GetWindowRect(&m_pRectMailto);
	ScreenToClient(&m_pRectLink);
	ScreenToClient(&m_pRectMailto);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void MyAbout::OnMouseMove(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	if((point.x>m_pRectLink.left && point.x<m_pRectLink.right &&
		point.y<m_pRectLink.bottom && point.y>m_pRectLink.top) ||
		(point.x>m_pRectMailto.left && point.x<m_pRectMailto.right &&
		point.y<m_pRectMailto.bottom && point.y>m_pRectMailto.top))
	{
		HCURSOR hCursor;
		hCursor = AfxGetApp()->LoadStandardCursor(IDC_UPARROW);
		SetCursor(hCursor);
	}
	CDialog::OnMouseMove(nFlags, point);
}

void MyAbout::OnLButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	if(point.x>m_pRectLink.left && point.x<m_pRectLink.right &&
		point.y<m_pRectLink.bottom && point.y>m_pRectLink.top)
	{
		if(nFlags == MK_LBUTTON)
		{
			ShellExecute(0,NULL,"http://www.whu.edu.cn",NULL,NULL,SW_NORMAL);
		}
	}

	if(point.x>m_pRectMailto.left && point.x<m_pRectMailto.right &&
		point.y<m_pRectMailto.bottom && point.y>m_pRectMailto.top)
	{
		ShellExecute(0,NULL,"mailto:tflong111@hotmail.com",NULL,NULL,SW_NORMAL);
	}
	CDialog::OnLButtonDown(nFlags, point);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -