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

📄 mousesheet.cpp

📁 讲mfc的书
💻 CPP
字号:
// MouseSheet.cpp : implementation file
//

#include "stdafx.h"
#include "mdlsprop.h"
#include "MouseSheet.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMouseSheet

IMPLEMENT_DYNAMIC(CMouseSheet, CPropertySheet)

CMouseSheet::CMouseSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}

CMouseSheet::CMouseSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
  leftct=rightct=midct=0;
  AddPage(&m_clickpage);
  AddPage(&m_pospage);
}

CMouseSheet::~CMouseSheet()
{
}


BEGIN_MESSAGE_MAP(CMouseSheet, CPropertySheet)
	//{{AFX_MSG_MAP(CMouseSheet)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMouseSheet message handlers


BOOL CMouseSheet::OnInitDialog() 
{
	return CPropertySheet::OnInitDialog();
}

void CMouseSheet::SetXY(int x, int y)
{
  m_pospage.m_x=x;
  m_pospage.m_y=y;
  if (::IsWindow(m_pospage.m_hWnd)) m_pospage.UpdateData(FALSE);
}

void CMouseSheet::MouseDown(int cmd)
{
	switch (cmd)
		{
		case WM_LBUTTONDOWN: 
			leftct++;
			break;
		case WM_RBUTTONDOWN: 
			rightct++;
			break;
		case WM_MBUTTONDOWN: 
			midct++;
			break;
		}
	m_clickpage.m_left=leftct;
	m_clickpage.m_right=rightct;
	m_clickpage.m_middle=midct;
	if (::IsWindow(m_clickpage.m_hWnd)) m_clickpage.UpdateData(FALSE);
}

⌨️ 快捷键说明

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