ClientDlg.h
上传用户:xsxdsb
上传日期:2009-12-14
资源大小:672k
文件大小:2k
源码类别:

书籍源码

开发平台:

Visual C++

  1. // ClientDlg.h : header file
  2. //
  3. #if !defined(AFX_CLIENTDLG_H__D73C4199_8B85_4D81_81D4_F3CFE191B562__INCLUDED_)
  4. #define AFX_CLIENTDLG_H__D73C4199_8B85_4D81_81D4_F3CFE191B562__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. #define CONNECE_PORT 8080     //定义通信端口
  9. #define TIME_OUT     5        //定义超时时限
  10. #include "winsock2.h"
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CClientDlg dialog
  13. class CClientDlg : public CDialog
  14. {
  15. // Construction
  16. public:
  17. CClientDlg(CWnd* pParent = NULL); // standard constructor
  18. // Dialog Data
  19. //{{AFX_DATA(CClientDlg)
  20. enum { IDD = IDD_CLIENT_DIALOG };
  21. CIPAddressCtrl m_ctrlServer;
  22. //}}AFX_DATA
  23. // ClassWizard generated virtual function overrides
  24. //{{AFX_VIRTUAL(CClientDlg)
  25. protected:
  26. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  27. //}}AFX_VIRTUAL
  28. // Implementation
  29. protected:
  30. HICON m_hIcon;
  31. // Generated message map functions
  32. //{{AFX_MSG(CClientDlg)
  33. virtual BOOL OnInitDialog();
  34. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  35. afx_msg void OnPaint();
  36. afx_msg HCURSOR OnQueryDragIcon();
  37. afx_msg void OnSynch();
  38. //}}AFX_MSG
  39. DECLARE_MESSAGE_MAP()
  40. public:
  41. void CClientDlg::ContactServer();
  42. public:
  43. SOCKET m_hSocket;
  44. sockaddr_in  m_ServerAddr;
  45. };
  46. //{{AFX_INSERT_LOCATION}}
  47. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  48. #endif // !defined(AFX_CLIENTDLG_H__D73C4199_8B85_4D81_81D4_F3CFE191B562__INCLUDED_)