scroll.cpp

来自「miXo is a buzz machine (www.buzzmachines」· C++ 代码 · 共 44 行

CPP
44
字号
// Scroll.cpp: implementation of the CScroll class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "mixer.h"
#include "Scroll.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CScroll::~CScroll()
{

}
void CScroll::SetPos(int iPos)
{
	::SetScrollPos(GetWndHandle(),SB_CTL,iPos,TRUE);
}
void CScroll::SetPositions(int iMin,int iMax,int iPage,int iPos)
{
	m_iPage=iPage;
	SCROLLINFO scInfo;
	scInfo.cbSize=sizeof(SCROLLINFO);
	scInfo.nMin=iMin;
	scInfo.nMax=iMax;
	scInfo.nPage=m_iPage;
	scInfo.nPos=iPos;
	scInfo.fMask=SIF_RANGE;
	::SetScrollInfo(GetWndHandle(),SB_CTL,&scInfo,TRUE);
	scInfo.fMask=SIF_PAGE;
	::SetScrollInfo(GetWndHandle(),SB_CTL,&scInfo,TRUE);
	scInfo.fMask=SIF_POS;
	::SetScrollInfo(GetWndHandle(),SB_CTL,&scInfo,TRUE);
}

⌨️ 快捷键说明

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