MainBordDlg.h
资源名称:多功能聊天程序.rar [点击查看]
上传用户:onsales
上传日期:2010-01-31
资源大小:224k
文件大小:2k
源码类别:
网络编程
开发平台:
Visual C++
- // MainBordDlg.h : header file
- //
- #if !defined(AFX_MAINBORDDLG_H__E259494C_5B05_48F0_9280_D63D302213BD__INCLUDED_)
- #define AFX_MAINBORDDLG_H__E259494C_5B05_48F0_9280_D63D302213BD__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #define WM_CLIENT_ACCEPT WM_USER+101
- #define WM_CLIENT_READCLOSE WM_USER+102
- /////////////////////////////////////////////////////////////////////////////
- // CMainBordDlg dialog
- #define TESTWM_NOTIFYICON WM_USER+10
- #define DEMOICON 1000
- class CMainBordDlg : public CDialog
- {
- // Construction
- public:
- int TrayAddIcon();
- char lpszTipBefore[100]; //修改前的图标提示信息
- CString ip;
- CString SystemMessage;
- void SendMsg();
- CString IPName;
- CString HostName;
- struct FriendList
- {
- char name[100];
- char IP[18];
- struct FriendList *next;
- public:
- CString ip;
- } *start,*last;
- void GetIP_Name();
- void SelectWay();
- CString ipaddress;
- CString name;
- LRESULT OnAccept(WPARAM wParam,LPARAM lParam);
- LRESULT OnRead(WPARAM wParam,LPARAM lParam);
- CMainBordDlg(CWnd* pParent = NULL); // standard constructor
- SOCKET Client; //客户的连接请求
- SOCKET ServerSocket; //SOCKET
- SOCKET tempSocket;
- SOCKADDR_IN tempSocketAddr;
- SOCKADDR_IN m_sockServerAddr; //SOCKET 结构
- BOOL IsTrue;
- // Dialog Data
- //{{AFX_DATA(CMainBordDlg)
- enum { IDD = IDD_MAINBORD_DIALOG };
- CListBox m_FriendList;
- //}}AFX_DATA
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMainBordDlg)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- HICON m_hIcon;
- // Generated message map functions
- //{{AFX_MSG(CMainBordDlg)
- virtual BOOL OnInitDialog();
- afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
- afx_msg LRESULT OnTestNotifyIcon(WPARAM wParam,LPARAM lParam);
- afx_msg void OnPaint();
- afx_msg HCURSOR OnQueryDragIcon();
- afx_msg void OnAddBTN();
- afx_msg void OnStartBTN();
- afx_msg void OnDblclkFriendLIST();
- afx_msg void OnPhoneBTN();
- afx_msg void OnSendFileBTN();
- afx_msg void OnHidebtn();
- afx_msg void OnSubmenu1();
- afx_msg void OnSubmenu2();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_MAINBORDDLG_H__E259494C_5B05_48F0_9280_D63D302213BD__INCLUDED_)