home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / leadtools / ocx32.lt / Netcap.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-03  |  5.0 KB  |  163 lines

  1. // NetCap.h : main header file for the NETCAP application
  2. //
  3. //{{AFX_INCLUDES()
  4. #include "..\..\..\..\include\l_ocx40.h"
  5. #include "..\..\..\..\include\ltcapocx.h"
  6. #include "..\..\..\..\include\ltnetocx.h"
  7. #include "leadcap.h"
  8. #include "leadnet.h"
  9. //}}AFX_INCLUDES
  10.  
  11. #ifndef __AFXWIN_H__
  12.     #error include 'stdafx.h' before including this file for PCH
  13. #endif
  14.  
  15. #include "resource.h"        // main symbols
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CNetCapApp:
  19. // See NetCap.cpp for the implementation of this class
  20. //
  21.  
  22. class CNetCapApp : public CWinApp
  23. {
  24. public:
  25.     CNetCapApp();
  26.  
  27. // Overrides
  28.     // ClassWizard generated virtual function overrides
  29.     //{{AFX_VIRTUAL(CNetCapApp)
  30.     public:
  31.     virtual BOOL InitInstance();
  32.     //}}AFX_VIRTUAL
  33.  
  34. // Implementation
  35.  
  36.     //{{AFX_MSG(CNetCapApp)
  37.     //}}AFX_MSG
  38.     DECLARE_MESSAGE_MAP()
  39. };
  40.  
  41.  
  42. /////////////////////////////////////////////////////////////////////////////
  43. // CNetCapDlg dialog
  44.  
  45. class CConnection;
  46. class CCapture;
  47.  
  48. class CNetCapDlg : public CDialog
  49. {
  50. // Construction
  51. public:
  52.     CNetCapDlg(CWnd* pParent = NULL);    // standard constructor
  53.  
  54. // Dialog Data
  55.     //{{AFX_DATA(CNetCapDlg)
  56.     enum { IDD = IDD_NETCAP_DIALOG };
  57.     CButton    m_SendSound;
  58.     CButton    m_SendBitmap;
  59.     CButton    m_PlaySound;
  60.     CEdit    m_BytesIn;
  61.     CEdit    m_BytesOut;
  62.     CEdit    m_BytesSpeed;
  63.     CEdit    m_ImagesIn;
  64.     CEdit    m_ImagesSpeed;
  65.     CEdit    m_ImagesOut;
  66.     CEdit    m_Time;
  67.     CEdit    m_Message;
  68.     CButton    m_VideoSource;
  69.     CButton    m_VideoFormat;
  70.     CButton    m_VideoCompression;
  71.     CButton    m_AudioFormat;
  72.     CTreeCtrl    m_Node;
  73.     CEdit    m_Computer;
  74.     CButton    m_Disconnect;
  75.     CButton    m_Server;
  76.     CButton    m_Connect;
  77.     CLeadCap    m_LeadCap;
  78.     CLeadNet    m_LeadNet;
  79.     //}}AFX_DATA
  80.  
  81.     // ClassWizard generated virtual function overrides
  82.     //{{AFX_VIRTUAL(CNetCapDlg)
  83.     protected:
  84.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  85.     //}}AFX_VIRTUAL
  86.  
  87. // Implementation
  88. public:
  89.     void Disconnect(short iComputer);
  90.  
  91. protected:
  92.     HICON      m_hIcon;
  93.    short      m_nServer;
  94.    HTREEITEM  m_hServerNode;
  95.    HTREEITEM  m_hClientNode;
  96.    long       m_hSound;
  97.    int        m_nStatus;
  98.    long       m_nWaveFormatTag;
  99.    long       m_nWaveChannels;
  100.    long       m_nWaveSamplesPerSec;
  101.    long       m_nWaveAvgBytesPerSec;
  102.    long       m_nWaveBlockAlign;
  103.    long       m_nWaveBitsPerSample;
  104.    long       m_nWaveExtraSize;
  105.    
  106.    void         ExpandTree(HTREEITEM hItem);
  107.    void         AppendConnection(short nComputer, int nMode);
  108.    void         DeleteConnection(short nComputer);
  109.    void         DeleteAllConnections();
  110.    int          GetServerConnections();
  111.    int          GetClientConnections();
  112.    void         CountConnections();
  113.    CConnection *FindConnection(short nComputer);
  114.    short        FindConnectionIP(short nComputer);
  115.    CConnection *GetCurrentConnection();
  116.    void         ShowCurrentConnection();
  117.    void         OpenCapture();
  118.    void         CloseCapture();
  119.    void         CloseSoundPlay();
  120.    void         OpenSoundSend();
  121.    void         CloseSoundSend();
  122.    void         DisplayMessage(short iComputer, char *szMessage);
  123.    void         GetHostName(short nComputer, char *szHostName);
  124.    void         GetHostIP(short nComputer, char *szHostIP);
  125.    void         TestQueue();
  126.  
  127.     // Generated message map functions
  128.     //{{AFX_MSG(CNetCapDlg)
  129.     virtual BOOL OnInitDialog();
  130.     afx_msg void OnConnect();
  131.     afx_msg void OnServer();
  132.     afx_msg void OnDisconnect();
  133.     afx_msg void OnSelchangedNode(NMHDR* pNMHDR, LRESULT* pResult);
  134.     afx_msg void OnDisconnectAll();
  135.     afx_msg void OnClose();
  136.     afx_msg void OnAudioFormat();
  137.     afx_msg void OnVideoCompression();
  138.     afx_msg void OnVideoFormat();
  139.     afx_msg void OnVideoSource();
  140.     afx_msg void OnSendSound();
  141.     afx_msg void OnPlaySound();
  142.     afx_msg void OnInetReceiveBitmap(short iComputer, long hBitmap);
  143.     afx_msg void OnInetReceiveData(short iComputer, const VARIANT FAR& pData, long lSize, short iType);
  144.     afx_msg void OnInetConnected(short iComputer);
  145.     afx_msg void OnInetDisconnected(short iComputer);
  146.     afx_msg void OnInetAccept(short iServer);
  147.     afx_msg void OnInetError(short iComputer, short iMessage, short iError);
  148.     afx_msg void OnInetReceiveStart(short iComputer, long lSize);
  149.     afx_msg void OnInetReceiving(short iComputer, long lSize);
  150.     afx_msg void OnInetDataSent(short iComputer, long lSize);
  151.     afx_msg void OnInetSending(short iComputer, long lSize);
  152.     afx_msg void OnInetReceiveSound(short iComputer, short iFormatTag, short nChannels, long lSamplesPerSec, long lAvgBytesPerSec, short iBlockAlign, short iBitsPerSample, short iExtraDataSize, const VARIANT FAR& pExtraData, const VARIANT FAR& pData, long lDataSize);
  153.     afx_msg void OnCapDriver(short iDriver, LPCTSTR pszName);
  154.     afx_msg void OnCapVideoData(long hDib, long lTime);
  155.     afx_msg void OnCapAudioData(const VARIANT FAR& pData, long lBytesRecorded, short iIndex);
  156.     afx_msg void OnTimer(UINT nIDEvent);
  157.     DECLARE_EVENTSINK_MAP()
  158.     //}}AFX_MSG
  159.     DECLARE_MESSAGE_MAP()
  160. };
  161.  
  162. /////////////////////////////////////////////////////////////////////////////
  163.