#if !defined(AFX_BITMAPSLIDERCTRL_H)
#define AFX_BITMAPSLIDERCTRL_H

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "stdafx.h"
#include "volumcontrol.h"

class CBitmapSliderCtrl : public CSliderCtrl
{
// Construction
public:
	CBitmapSliderCtrl();
	//-----------
		CDC			m_dcBk;

	CBitmap m_Thumb,m_Chanel;//slider skin picture
	CPen m_penThumb;
	CPen m_penThumbLight;
	CPen m_penThumbLighter;
	CPen m_penThumbDark;
	CPen m_penThumbDarker;
	COLORREF m_crThumb;
	COLORREF m_crThumbLight;
	COLORREF m_crThumbLighter;
	COLORREF m_crThumbDark;
	COLORREF m_crThumbDarker;
	//---------------
// Attributes
public:

// Operations
public:
	void SetChannelColor(COLORREF crColor);
	COLORREF GetChannelColor();
	void SetThumbColor(COLORREF crColor);
	COLORREF GetThumbColor();
	void SetSelectionColor(COLORREF crColor);
	COLORREF GetSelectionColor();
	CVolumControl  m_VControl;
	void LoadSliderSkin(char *SkinFile);
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CBitmapSliderCtrl)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CBitmapSliderCtrl();
	//CSliderCtrl::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
	// Generated message map functions
protected:
	//{{AFX_MSG(CBitmapSliderCtrl)
	afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
private:

	void DrawHorizontalBitmapThumb(CDC* pDC, const CRect &rect);
	void DrawBitmapChannel(CDC* pDC, const CRect &rect, BOOL bHoriz);

};

#endif 
