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

📄 cslider.h

📁 EVC环境下用SDK开发WINCE的应用程序
💻 H
字号:
//===========================================================================
// CSlider.h
//===========================================================================
#ifndef _CSlider_H_
#define _CSlider_H_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "CZipBitmap.h"

//===========================================================================
// defines
//===========================================================================
typedef void (CALLBACK funcCallback)( void *param );

//===========================================================================
//  CSlider
//===========================================================================
class CSlider : public CNCtrl
{
public:
    //=======================
    // functions
    //=======================
	CSlider();
	virtual ~CSlider();

	void SetCallback( funcCallback *pCallback, void *param );
	void SetSkin( UINT uiBackGround1, UINT uiBackGround2, UINT uiTickImage );
	void SetRange(int nMin, int nMax, BOOL bRedraw = FALSE);
	void GetRange(int* nMin, int *nMax);
	UINT32  GetPos();
    UINT32  SetPos( UINT32 nPos );

private:
    //=======================
    // data
    //=======================
	CZipBitmap *m_bmpBack1;
	CZipBitmap *m_bmpBack2;
	CZipBitmap *m_bmThumb;
	BOOL	    m_bDragging;
	HBRUSH      m_brush;

	RECT		m_Rect;
    UINT32      m_ThumbPos;
    UINT32      m_Pos;
    UINT32      m_Min;
    UINT32      m_Max;

    funcCallback *m_Callback;
    void         *m_param;

protected:
    //=======================
    // functions
    //=======================
	virtual void OnDraw(HDC hdc);
	virtual void OnLButtonDown(UINT nFlags, POINT point);
	virtual void OnLButtonUp(UINT nFlags, POINT point);
	virtual void OnMouseMove(UINT nFlags, POINT point);

	DECLARE_MESSAGE_MAP()

    void RefreshRect();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // _CSlider_H_

⌨️ 快捷键说明

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