www.pudn.com > data-isotransfer.rar > usbhostDlg.h


// usbhostDlg.h : header file 
// 
 
#if !defined(AFX_USBHOSTDLG_H__F04EC6E8_8F4C_11D7_B83E_00E04C00AA4B__INCLUDED_) 
#define AFX_USBHOSTDLG_H__F04EC6E8_8F4C_11D7_B83E_00E04C00AA4B__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
typedef LONG USBD_STATUS; 
 
typedef struct 
{ 
	unsigned short x;         
	unsigned short y;         
}PointP; 
 
typedef struct _USBD_ISO_PACKET_DESCRIPTOR { 
    ULONG Offset;   
 
    ULONG Length;     
                      
    USBD_STATUS Status;  
} USBD_ISO_PACKET_DESCRIPTOR, *PUSBD_ISO_PACKET_DESCRIPTOR; 
 
///////////////////////////////////////////////////////////////////////////// 
// CUsbhostDlg dialog 
 
class CUsbhostDlg : public CDialog 
{ 
// Construction 
public: 
	CUsbhostDlg(CWnd* pParent = NULL);	// standard constructor 
 
// Dialog Data 
	//{{AFX_DATA(CUsbhostDlg) 
	enum { IDD = IDD_USBHOST_DIALOG }; 
	CListBox	m_UsbList; 
	//}}AFX_DATA 
 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CUsbhostDlg) 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
	HICON m_hIcon; 
 
	// Generated message map functions 
	//{{AFX_MSG(CUsbhostDlg) 
	virtual BOOL OnInitDialog(); 
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 
	afx_msg void OnPaint(); 
	afx_msg HCURSOR OnQueryDragIcon(); 
	afx_msg void OnExitButton(); 
	afx_msg void OnDeviceButton(); 
	afx_msg void OnConfigButton(); 
	afx_msg void OnClearlistButton(); 
	afx_msg void OnStartButton(); 
	afx_msg void OnAboutButton(); 
	afx_msg void OnStopButton(); 
	afx_msg void OnSaveButton(); 
	afx_msg void OnReplayButton(); 
	afx_msg void OnCleargraphButton(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
 
protected: 
    float m_XOriginScale,m_YOriginScale;   
    float m_xStart,m_yStart;    
 
    float m_xLineStart[800]; 
    CUIntArray m_XLineStart; 
    int m_xn; 
 
    float m_yLineStart[800]; 
    CUIntArray m_YLineStart; 
    int m_yn; 
 
    long m_LeftDis; 
    long m_RightDis; 
    long m_UpDis; 
    long m_DownDis; 
 
	long m_LeftRim; 
	long m_RightRim; 
	long m_UpRim; 
	long m_DownRim; 
 
    CRect Urect;           
	CRect Drect;           
	CRect Lrect;           
	CRect Rrect;           
	CRect InnerRect;       
    CRect TotalRect;       
 
    void DrawUDLRrect(CDC *pDC); 
    void GetUDLRrect(); 
 
public:		 
    void DrawCurve (CDC *pDC); 
	void DrawLab(CDC *pDC); 
 
	void GetRectBlc(float xRectStart,float yRectStart,float xRectEnd,float yRectEnd); 
 
    void GetBackLines(float xRectStart,float yRectStart,float xRectEnd,float yRectEnd); 
	void DrawBackLines (CDC *pDC); 
     
	void XLPtoXVP(int x,float *X); 
    void YLPtoYVP(int y,float *Y); 
 
    void XVPtoXLP(float x,int *X); 
    void YVPtoYLP(float y,int *Y); 
 
public: 
	char DeviceName[64]; 
	BOOLEAN UsbOpenDriver (HANDLE *phDeviceHandle, PCHAR devname); 
}; 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_USBHOSTDLG_H__F04EC6E8_8F4C_11D7_B83E_00E04C00AA4B__INCLUDED_)