#pragma once
#include "DblScope.h"

//void InitWindowStyles(CWnd* pWnd);

class CMiniMule : public CDialog
{
	friend class CemuleDlg;	
	DECLARE_DYNAMIC(CMiniMule)

public:
	CMiniMule(CWnd* pParent = NULL);   // standard constructor
	virtual ~CMiniMule();
// Dialog Data
	enum { IDD = IDD_MINIMULE };
	//virtual		BOOL	OnCommand( WPARAM wParam, LPARAM lParam );
	void SetSpeedMeterValues(int iValue1, int iValue2)	{m_ctrlSpeedMeter.AddValues(iValue1,iValue2);}
	void SetSpeedMeterRange();
	//void SetSpeedMeterRange(UINT nMin, UINT nMax, bool bDelete = false)		{m_ctrlSpeedMeter.SetRange(nMin, nMax, bDelete);}
	//void GetSpeedMeterRange(UINT& nMax, UINT& nMin)		{m_ctrlSpeedMeter.GetRange(nMax, nMin);}

    void EnableEasyMove(bool pEnable = TRUE);
    bool SetTransparent(BYTE bAlpha);
	void RunMiniMule(bool resetMiniMule = false);
	void SetManual()	{ manual = true; }
	bool IsManual()		{ return manual; }
	void Show();
	void Hide();

protected:
	bool m_bWin2K;

	void MMUpdate(void);
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnWindowPosChanging( WINDOWPOS* lpwndpos );
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//	afx_msg void OnMenuButtonClicked();
	virtual BOOL OnInitDialog();
//	void DoMenu(CPoint doWhere);
	//afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	void OnClose();

	DECLARE_MESSAGE_MAP()

private:
	bool m_bEasyMove;

	CStatic	m_ctrlMMConnState;
	CDblScope m_ctrlSpeedMeter;
	HICON m_hCSConn;
	HICON m_hCSCing;
	HICON m_hCSDconn;

	bool reset;
	bool manual;

	void Init();
};
