www.pudn.com > Paint_SockAPI.rar > ChildView.h
// ChildView.h : interface of the CChildView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CHILDVIEW_H__4A912955_766D_415F_A1D3_E954CE3A3373__INCLUDED_)
#define AFX_CHILDVIEW_H__4A912955_766D_415F_A1D3_E954CE3A3373__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "CConnection.h"
/////////////////////////////////////////////////////////////////////////////
// CChildView window
// 自定义消息,设置状态条
#define WM_SETSTATUS WM_USER+0x01
class CChildView : public CWnd
{
// Construction
public:
CChildView();
// Attributes
public:
HBITMAP m_hBitmap;
RECT m_ClientRect;
HDC m_hMemDC;
CPoint m_oldpoint;
int m_PenWidth;
CNetworking Networking; // 服务器
CConnection* Connection; // 客户端
char m_addr[64]; // 服务器方地址
int m_port; // 服务器方端口
void ShowLocalIP();
int pand;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChildView)
public:
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
virtual BOOL DestroyWindow();
protected:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CChildView();
// Generated message map functions
protected:
//{{AFX_MSG(CChildView)
afx_msg void OnPaint();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSetpen();
afx_msg void OnListen();
afx_msg void OnUpdateListen(CCmdUI* pCmdUI);
afx_msg void OnConnect();
afx_msg void OnUpdateConnect(CCmdUI* pCmdUI);
afx_msg void OnErase();
afx_msg void OnSetFocus(CWnd *pOldWnd);
//}}AFX_MSG
LRESULT OnSetStatus(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHILDVIEW_H__4A912955_766D_415F_A1D3_E954CE3A3373__INCLUDED_)