📄 chineseqiview.h
字号:
// chineseqiView.h : interface of the CChineseqiView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CHINESEQIVIEW_H__DB58B3A1_5E6C_11D5_8E58_0050BA1AACA1__INCLUDED_)
#define AFX_CHINESEQIVIEW_H__DB58B3A1_5E6C_11D5_8E58_0050BA1AACA1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "qishu.h"
#include "chineseqidoc.h"
#include "listensocket.h"
#include "ipdialog.h"
#include "tcpsocket.h"
#include "setupdlg.h"
#define GOBACK 6
#define ACCEPT 7
#define REJECT 8
#define MOVEOK 9
#define SAVE 20
#define KILL 21
#define NOMAT 22
#define TOKILL 30
#define TOSAVE 32
#define TONO 31
#define MSGOK 100
#define MAXSENDSTR 100
#define DIALOG 112
#define MAXLINE 8
#define MAXSTRSTAY 100
#define YOUWIN 50
#define READY 111
#define READYTOO 113
class CMainFrame;
class dialogstring
{
public:
dialogstring();
virtual ~dialogstring();
public:
CString string;
BOOL myself;
};
class CChineseqiView : public CView
{
protected: // create from serialization only
CChineseqiView();
DECLARE_DYNCREATE(CChineseqiView)
BOOL hasbegin ;
int boardwidth;
int boardheight;
qishu *myqi;
BOOL bered;
BOOL hasright;
int marginleft;
int margintop;
CString showstring;
Listensocket * mainsocket;
Tcpsocket * comsocket;
CString othername;
CString myname;
struct moveobject
{
int x;
int y;
int obj;
int left;
int top;
CBitmap bmp;
} nowmoveobj;
struct commsg
{
int fx;
int fy;
int tx;
int ty;
unsigned char dialog[MAXSENDSTR];
BOOL right;
int command;
};
// Attributes
public:
BOOL moving;
BOOL bemoveing;
BOOL jiang;
HCURSOR busycur;
HCURSOR handcur;
HCURSOR movecur;
CBitmap bkmap;
CWinApp *myapp;
CString filename;
int nowseek;
int wihich;
void drawmoveobj(CDC *dc);
void drawdead(CDC *dc);
void drawqi(CDC *dc);
void beginmoveqithread();
void moveqi(int fx,int fy,int tx,int ty);
void restore();
void ProcessPendingLink();
void TransparentBlt(CDC * pDestDc, int x, int y, int w, int h, CBitmap * pBmp, int sx, int sy, COLORREF crTransparent);
void ProcessPendingRead(char *buf,UINT length);
void flash(int x,int y,int old);
void redrawall(CDC * pDC);
void erasemove();
void setpanel(CString text);
static void myproc(LPARAM param);
static void mymoveqiproc(LPARAM param);
void drawstring(CDC *dc);
void checktimeout();
CPtrArray qiarray;
CPtrArray strlist;
CChineseqiDoc * GetDocument();
void closethread();
void beginthread();
void clear();
COLORREF bkcolor;
int nowseekqi;
int nowstatus;
BOOL bepop;
CBitmap movebmp;
long m_timeout;
BOOL quitthread;
BOOL blninput;
CPoint frompt;
CPoint topt;
int timer;
int nowthick;
COLORREF editcolor;
COLORREF myselfcolor;
COLORREF othercolor;
CFont txtfont;
BOOL getreadinfo;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChineseqiView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CChineseqiView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CChineseqiView)
afx_msg void OnRENSHU();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg void OnCREATE();
afx_msg void OnJOIN();
afx_msg void OnDestroy();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnSETUP();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnREGRET();
afx_msg void OnWHATTHIS();
afx_msg void OnSTATU();
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in chineseqiView.cpp
inline CChineseqiDoc* CChineseqiView::GetDocument()
{ return (CChineseqiDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHINESEQIVIEW_H__DB58B3A1_5E6C_11D5_8E58_0050BA1AACA1__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -