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

📄 dbslider.cpp

📁 用VISUAL C++设计的客户资源管理系统
💻 CPP
字号:
// DBSlider.cpp : implementation file
//

#include "stdafx.h"
#include "源程序.h"
#include "DBSlider.h"
#include "RainFunction.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDBSlider

CDBSlider::CDBSlider()
{
}

CDBSlider::~CDBSlider()
{
}


BEGIN_MESSAGE_MAP(CDBSlider, CSliderCtrl)
	//{{AFX_MSG_MAP(CDBSlider)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDBSlider message handlers

BOOL CDBSlider::PreTranslateMessage(MSG* pMsg) 
{
	int pos;
	CString sPos;
	if(pMsg->message==WM_LBUTTONDOWN || (pMsg->message==WM_KEYDOWN && (pMsg->wParam==37 ||pMsg->wParam==39)))
	{
		try{
		pos=this->GetPos();
		this->Recordset->MoveFirst();
		this->Recordset->Move(pos);
		this->Record=pos;
		sPos.Format("%d",pos);
		}
		catch(...)
		{
			return -1;
		}
	}
	return CSliderCtrl::PreTranslateMessage(pMsg);
}

void CDBSlider::Init()
{
	if(function.RecordCount(this->Recordset)>0)
	{
		this->SetRangeMax(function.RecordCount(this->Recordset),true);
		this->SetRangeMin(1,true);	
	}

}

⌨️ 快捷键说明

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