

#pragma once

#include "SPdbUSBmdll.h"
#include "afxwin.h"

class CSDK_NonlinearityCorrectionDlg : public CDialogEx
{
public:
	CSDK_NonlinearityCorrectionDlg(CWnd* pParent = NULL);	

	enum { IDD = IDD_SDK_NONLINEARITYCORRECTION_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	


protected:
	HICON m_hIcon;

	short sCCDType;
	short sTotPixel;
	short sRealPixel;
	short sOpicalBlk;
	double *dWLTable;
	long *lArrayData;
	double dYRate, dXRate;

	CWinThread *m_pThread;

	HANDLE hThread;
	bool m_bStop;
	static UINT GetDataThread(LPVOID pParam);

	void DrawGraph();
	void DrawPlotData(CDC *pDC,CRect rect);

	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedBtnDevcon();
	afx_msg void OnBnClickedBtnIntset();
	afx_msg void OnBnClickedBtnStart();
	afx_msg void OnBnClickedBtnStop();
	long m_lIntTime;
	CString m_strInform;
	CButton m_btnStart;
	CButton m_btnStop;
	afx_msg void OnClose();
	afx_msg void OnBnClickedBtnDark();
	long m_sTimeAvge;
};
