⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctpdemodlg.h

📁 用UDP写的可靠传输程序源代码,非常有借鉴意义,适合互连网通讯
💻 H
字号:
// CTPDemoDlg.h : header file
//
// (c) Lev Naumov, CAMEL Laboratory
// E-mail: camellab@mail.ru
// For more information see http://camel.ifmo.ru or
// http://www.codeproject.com/internet/ctp.asp
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CTPDEMODLG_H__5F5ED328_6A88_4E47_AF2B_EB3C7504DB76__INCLUDED_)
#define AFX_CTPDEMODLG_H__5F5ED328_6A88_4E47_AF2B_EB3C7504DB76__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CCTPDemoDlg dialog

class CCTPDemoDlg : public CDialog
{
// Construction
public:
    CCTPDemoDlg(CWnd* pParent = NULL);    // standard constructor
    virtual ~CCTPDemoDlg();

    // CTP status dialog
    CCTPStatusDlg* m_pCTPStatus;

// Dialog Data
    //{{AFX_DATA(CCTPDemoDlg)
    enum { IDD = IDD_CTPDEMO_DIALOG };
    CIPAddressCtrl    m_IPAddr;
    CString    m_sSendText;
    int        m_iProtocol;
    //}}AFX_DATA

    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CCTPDemoDlg)
    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    //}}AFX_VIRTUAL

    // Enable or disable all controls, related to CTP features
    void EnableCTPControls(BOOL enable);

    // Arrange sending options for CTP and return them
    unsigned __int8 ArrangeOptions();

// Implementation
protected:
    HICON m_hIcon;

    // Generated message map functions
    //{{AFX_MSG(CCTPDemoDlg)
    virtual BOOL OnInitDialog();
    afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
    afx_msg void OnPaint();
    afx_msg HCURSOR OnQueryDragIcon();
    afx_msg void OnSendtext();
    afx_msg void OnSendfile();
    afx_msg void OnCtpstatus();
    afx_msg void OnTimer(UINT nIDEvent);
    afx_msg void OnUsectp();
    afx_msg void OnUsetcp();
    afx_msg void OnUseudp();
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()

    // Protocols implementations
    CCTPNet* m_pCTP;
    CTCPNet* m_pTCP;
    CUDPNet* m_pUDP;
    
    // Necessary recievers
    CCTPNetReceiver* m_pCTPReceiver;
    CTCPNetReceiver* m_pTCPReceiver;
    CUDPNetReceiver* m_pUDPReceiver;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CTPDEMODLG_H__5F5ED328_6A88_4E47_AF2B_EB3C7504DB76__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -