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

📄 top10dlg.cpp

📁 网络围棋对战的客户端
💻 CPP
字号:
// Top10Dlg.cpp : implementation file
//

#include "stdafx.h"
#include "WeiQiClient.h"
#include "Top10Dlg.h"
#include "Client.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CTop10Dlg dialog


CTop10Dlg::CTop10Dlg(CWnd* pParent /*=NULL*/)
	: CDialog(CTop10Dlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CTop10Dlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CTop10Dlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CTop10Dlg)
	DDX_Control(pDX, IDC_LIST_TOP10, m_Top10List);
	DDX_Control(pDX,IDC_BUTTON_OK,m_OKButton);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CTop10Dlg, CDialog)
	//{{AFX_MSG_MAP(CTop10Dlg)
	ON_BN_CLICKED(IDC_BUTTON_OK, OnButtonOk)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTop10Dlg message handlers

BOOL CTop10Dlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_OKButton.LoadButtonBmp(IDB_BITMAPTOP1,IDB_BITMAPTOP2,IDB_BITMAPTOP3,IDB_BITMAPCONNECTBK);

	m_Tip.Create(this);
	m_Tip.AddTool(&m_OKButton,_T("确定"));

	((CWeiQiClientApp*)AfxGetApp())->m_pClient->SendMsg(_T("__TOPTEN__"));
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CTop10Dlg::SetListBox(PTSTR pMsg)
{
	m_Top10List.ResetContent();
	int i=0,j=0;
	TCHAR Name[40];
	while(pMsg[i])
	{
		if(pMsg[i]==_T(' '))
		{
			Name[j]=0;
			j=0;
			m_Top10List.AddString(Name);
			i++;
		}
		Name[j]=pMsg[i];
		i++;
		j++;
	}
}

void CTop10Dlg::OnButtonOk() 
{
	// TODO: Add your control notification handler code here
	OnOK();
}

⌨️ 快捷键说明

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