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

📄 linkgameexdlg.cpp

📁 一个类似与浩方的战网平台源代码
💻 CPP
📖 第 1 页 / 共 3 页
字号:
		break;
	}
	*pResult = 0;
}

void CLinKGameExDlg::OnBtnback() 
{
	// TODO: Add your control notification handler code here
	this->ChkShow( 1);
}

void CLinKGameExDlg::OnBtnsendchat() 
{
	// TODO: Add your control notification handler code here
	if( 0 == this->m_EditChat.GetWindowTextLength())
	{
		MessageBox( _T(LINKFAYANALERT), _T(LINKFAYANTISHI), MB_OK);
		return;
	}
	CString m_strChat;
	this->m_EditChat.GetWindowText( m_strChat);
	this->m_AllChatList.AddString( m_strChat);
	this->m_MyChatList.AddString( m_strChat);
	this->m_EditChat.SetWindowText( "");
	this->m_EditChat.SetFocus();
}

void CLinKGameExDlg::InitGameTab()
{
	// 初始化 个人信息
	/*CTabCtrl* m_TabEx = (CTabCtrl*)this->GetDlgItem(IDC_GAMETAB);
	m_TabEx->InsertItem( 0, "网络对战");
	m_TabEx->InsertItem( 1, "网络游戏");
	m_TabEx->InsertItem( 2, "棋牌游戏");
	m_TabEx->InsertItem( 3, "单机游戏");
	m_TabEx->InsertItem( 4, "休闲游戏");

	m_WLDZ.Create( IDD_DLGWLDZ, m_TabEx);	
	m_WLYX.Create( IDD_DLGWLYX, m_TabEx);
	m_QPYX.Create( IDD_DLGQPYX, m_TabEx);
	m_DJYX.Create( IDD_DLGDJYX, m_TabEx);
	m_XXYX.Create( IDD_DLGXXYX, m_TabEx);

	m_WLDZ.ShowWindow(1);
	m_WLYX.ShowWindow(0);
	m_QPYX.ShowWindow(0);
	m_DJYX.ShowWindow(0);
	m_XXYX.ShowWindow(0);*/

	this->m_GameTab.ShowWindow(0); // 隐藏GameTab
}

void CLinKGameExDlg::InitGRTab()
{
	// 初始化 个人信息
	CTabCtrl* m_TabEx = (CTabCtrl*)this->GetDlgItem(IDC_TAB);
	m_TabEx->InsertItem( 0, "个人信息");
	m_TabEx->InsertItem( 1, "战队信息");
	m_TabEx->InsertItem( 2, "通讯专栏");
	m_TabEx->InsertItem( 3, "平台公告");

	m_GR.Create( IDD_DLGGR, m_TabEx);	
	m_ZD.Create( IDD_DLGZD, m_TabEx);
	m_TX.Create( IDD_DLGTX, m_TabEx);
	m_GG.Create( IDD_DLGGG, m_TabEx);

	m_GR.ShowWindow(1);
	m_ZD.ShowWindow(0);
	m_TX.ShowWindow(0);
	m_GG.ShowWindow(0);
}

// 判断那些控件是否显示
void CLinKGameExDlg::ChkShow( int x)
{
	// x为1时说明在一级大厅, x为2时说明在二级大厅
	if( 1 == x)
	{
		this->m_LinKIE.SetWidth( /*LINKIEWIDTH*/0);
		this->m_LinKIE.SetHeight( /*LINKIEHEIGHT*/0);
		this->m_AreaList.ShowWindow(1);
		this->m_RoomList.ShowWindow(1);
		this->m_AllChatList.ShowWindow(0);
		this->m_MyChatList.ShowWindow(0);
		this->m_EditChat.ShowWindow(0);
		this->m_BtnSendChat.ShowWindow(0);
		this->m_BtnAlert.ShowWindow(0);
		this->m_BtnTiRen.ShowWindow(0);
		this->m_BtnSendMsg.ShowWindow(0);
		this->m_BtnGame.ShowWindow(0);
		this->m_BtnBack.ShowWindow(0);		
	}
	if( 2 == x)
	{
		this->m_LinKIE.SetWidth( 0);
		this->m_LinKIE.SetHeight( 0);
		this->m_AreaList.ShowWindow( 0);
		this->m_RoomList.ShowWindow( 0);
		this->m_AllChatList.MoveWindow( ALLCHATLISTLEFT, ALLCHATLISTTOP, ALLCHATLISTWIDTH, ALLCHATLISTHEIGHT, 1);
		this->m_AllChatList.ShowWindow(1);
		this->m_MyChatList.MoveWindow( MYCHATLISTLEFT, MYCHATLISTTOP, MYCHATLISTWIDTH, MYCHATLISTHEIGHT, 1);
		this->m_MyChatList.ShowWindow(1);
		this->m_EditChat.MoveWindow( EDITCHATLEFT, EDITCHATTOP, EDITCHATWIDTH, EDITCHATHEIGHT, 1);
		this->m_EditChat.ShowWindow(1);
		this->m_BtnSendChat.MoveWindow( BTNSENDCHATLEFT, BTNSENDCHATTOP, BTNSENDCHATWIDTH, BTNSENDCHATHEIGHT, 1);
		this->m_BtnSendChat.ShowWindow(1);
		this->m_BtnAlert.MoveWindow( BTNALERTLEFT, BTNALERTTOP, BTNALERTWIDTH, BTNALERTHEIGHT, 1);
		this->m_BtnAlert.ShowWindow(1);
		this->m_BtnTiRen.MoveWindow( BTNTIRENLEFT, BTNTIRENTOP, BTNTIRENWIDTH, BTNTIRENHEIGHT, 1);
		this->m_BtnTiRen.ShowWindow(1);
		this->m_BtnSendMsg.MoveWindow( BTNSENDMSGLEFT, BTNSENDMSGTOP, BTNSENDMSGWIDTH, BTNSENDMSGHEIGHT, 1);
		this->m_BtnSendMsg.ShowWindow(1);
		this->m_BtnGame.MoveWindow( BTNGAMELEFT, BTNGAMETOP, BTNGAMEWIDTH, BTNGAMEHEIGHT, 1);
		this->m_BtnGame.ShowWindow(1);
		this->m_BtnBack.MoveWindow( BTNBACKLEFT, BTNBACKTOP, BTNBACKWIDTH, BTNBACKHEIGHT, 1);
		this->m_BtnBack.ShowWindow(1);
	}
	this->UpdateWindow();
}

void CLinKGameExDlg::OnSelchangeGametab(NMHDR* pNMHDR, LRESULT* pResult) 
{
	// TODO: Add your control notification handler code here
	CTabCtrl* m_TabEx = (CTabCtrl *)this->GetDlgItem(IDC_GAMETAB);
	switch(m_TabEx->GetCurSel()) // 返回选中页数
	{
	case 0:  
		m_WLDZ.ShowWindow(SW_SHOW);
		m_WLYX.ShowWindow(SW_HIDE);
		m_QPYX.ShowWindow(SW_HIDE);
		m_DJYX.ShowWindow(SW_HIDE);
		m_XXYX.ShowWindow(SW_HIDE);
		break;
	case 1:  
		m_WLDZ.ShowWindow(SW_HIDE);
		m_WLYX.ShowWindow(SW_SHOW);
		m_QPYX.ShowWindow(SW_HIDE);
		m_DJYX.ShowWindow(SW_HIDE);
		m_XXYX.ShowWindow(SW_HIDE);
		break;
	case 2:  
		m_WLDZ.ShowWindow(SW_HIDE);
		m_WLYX.ShowWindow(SW_HIDE);
		m_QPYX.ShowWindow(SW_SHOW);
		m_DJYX.ShowWindow(SW_HIDE);
		m_XXYX.ShowWindow(SW_HIDE);
		break;
	case 3:  
		m_WLDZ.ShowWindow(SW_HIDE);
		m_WLYX.ShowWindow(SW_HIDE);
		m_QPYX.ShowWindow(SW_HIDE);
		m_DJYX.ShowWindow(SW_SHOW);
		m_XXYX.ShowWindow(SW_HIDE);
		break;
	case 4:  
		m_WLDZ.ShowWindow(SW_HIDE);
		m_WLYX.ShowWindow(SW_HIDE);
		m_QPYX.ShowWindow(SW_HIDE);
		m_DJYX.ShowWindow(SW_HIDE);
		m_XXYX.ShowWindow(SW_SHOW);
		break;
	}
	*pResult = 0;
}

void CLinKGameExDlg::InitGameType()
{
	this->m_GameType.MoveWindow( GAMETYPELEFT, GAMETYPETOP, GAMETYPEWIDTH, GAMETYPEHEIGHT, 1);
	
	this->m_BtnWLDZ.MoveWindow( BTNWLDZLEFT, BTNWLDZTOP, BTNWLDZWIDTH,BTNWLDZHEIGHT, 1);
	this->m_WLDZList.MoveWindow( WLDZLISTLEFT, WLDZLISTTOP, WLDZLISTWIDTH, WLDZLISTHEIGHT, 1);
	InitWLDZList();
	this->m_WLDZList.ShowWindow(0);

	this->m_BtnWLYX.MoveWindow( BTNWLYXLEFT, BTNWLYXTOP, BTNWLYXWIDTH, BTNWLYXHEIGHT, 1);
	this->m_WLYXList.MoveWindow( WLYXLISTLEFT, WLYXLISTTOP, WLYXLISTWIDTH, WLYXLISTHEIGHT, 1);
	InitWLYXList();
	this->m_WLYXList.ShowWindow(0);
	
	this->m_BtnQPYX.MoveWindow( BTNQPYXLEFT, BTNQPYXTOP, BTNQPYXWIDTH, BTNQPYXHEIGHT, 1);
	this->m_QPYXList.MoveWindow( QPYXLISTLEFT, QPYXLISTTOP, QPYXLISTWIDTH, QPYXLISTHEIGHT, 1);
	InitQPYXList();
	this->m_QPYXList.ShowWindow(0);
	
	this->m_BtnDJYX.MoveWindow( BTNDJYXLEFT, BTNDJYXTOP, BTNDJYXWIDTH, BTNDJYXHEIGHT, 1);
	this->m_DJYXList.MoveWindow( DJYXLISTLEFT, DJYXLISTTOP, DJYXLISTWIDTH, DJYXLISTHEIGHT, 1);
	InitDJYXList();
	this->m_DJYXList.ShowWindow(0);

	this->m_BtnXXYX.MoveWindow( BTNXXYXLEFT, BTNXXYXTOP, BTNXXYXWIDTH, BTNXXYXHEIGHT, 1);
	this->m_XXYXList.MoveWindow( XXYXLISTLEFT, XXYXLISTTOP, XXYXLISTWIDTH, XXYXLISTHEIGHT, 1);
	InitXXYXList();	
	this->m_XXYXList.ShowWindow(0);
}

void CLinKGameExDlg::OnBtnwldz() 
{
	// TODO: Add your control notification handler code here
	this->m_LinKIE.Navigate( WLDZWEB, NULL, NULL, NULL, NULL);
	this->m_RoomList.ShowWindow(0);
	this->m_LinKIE.SetWidth( LINKIEWIDTH);
	this->m_LinKIE.SetHeight( LINKIEHEIGHT);

	this->m_WLDZList.ShowWindow(1);
	this->m_BtnWLYX.MoveWindow( BTNWLYXLEFT, 700-20*4+70, BTNWLYXWIDTH, BTNWLYXHEIGHT, 1);
	this->m_WLYXList.ShowWindow(0);

	this->m_BtnQPYX.MoveWindow( BTNQPYXLEFT, 700-20*3+70, BTNQPYXWIDTH, BTNQPYXHEIGHT, 1);
	this->m_QPYXList.ShowWindow(0);

	this->m_BtnDJYX.MoveWindow( BTNDJYXLEFT, 700-20*2+70, BTNDJYXWIDTH, BTNDJYXHEIGHT, 1);
	this->m_DJYXList.ShowWindow(0);

	this->m_BtnXXYX.MoveWindow( BTNXXYXLEFT, 700-20*1+70, BTNXXYXWIDTH, BTNXXYXHEIGHT, 1);
	this->m_XXYXList.ShowWindow(0);
}

void CLinKGameExDlg::OnBtnwlyx() 
{
	// TODO: Add your control notification handler code here
	this->m_LinKIE.Navigate( WLYXWEB, NULL, NULL, NULL, NULL);
	this->m_RoomList.ShowWindow(0);
	this->m_LinKIE.SetWidth( LINKIEWIDTH);
	this->m_LinKIE.SetHeight( LINKIEHEIGHT);

	this->m_WLDZList.ShowWindow(0);

	this->m_BtnWLYX.MoveWindow( BTNWLYXLEFT, BTNWLYXTOP, BTNWLYXWIDTH, BTNWLYXHEIGHT, 1);
	this->m_WLYXList.ShowWindow(1);

	this->m_BtnQPYX.MoveWindow( BTNQPYXLEFT, 700-20*3+70, BTNQPYXWIDTH, BTNQPYXHEIGHT, 1);
	this->m_QPYXList.ShowWindow(0);
	
	this->m_BtnDJYX.MoveWindow( BTNDJYXLEFT, 700-20*2+70, BTNDJYXWIDTH, BTNDJYXHEIGHT, 1);
	this->m_DJYXList.ShowWindow(0);
	
	this->m_BtnXXYX.MoveWindow( BTNXXYXLEFT, 700-20*1+70, BTNXXYXWIDTH, BTNXXYXHEIGHT, 1);
	this->m_XXYXList.ShowWindow(0);
}

void CLinKGameExDlg::OnBtnqpyx() 
{
	// TODO: Add your control notification handler code here
	this->m_LinKIE.Navigate( QPYXWEB, NULL, NULL, NULL, NULL);
	this->m_RoomList.ShowWindow(0);
	this->m_LinKIE.SetWidth( LINKIEWIDTH);
	this->m_LinKIE.SetHeight( LINKIEHEIGHT);

	this->m_WLDZList.ShowWindow(0);

	this->m_BtnWLYX.MoveWindow( BTNWLYXLEFT, BTNWLYXTOP, BTNWLYXWIDTH, BTNWLYXHEIGHT, 1);
	this->m_WLYXList.ShowWindow(0);

	this->m_BtnQPYX.MoveWindow( BTNQPYXLEFT, BTNQPYXTOP, BTNQPYXWIDTH, BTNQPYXHEIGHT, 1);
	this->m_QPYXList.ShowWindow(1);
	
	this->m_BtnDJYX.MoveWindow( BTNDJYXLEFT, 700-20*2+70, BTNDJYXWIDTH, BTNDJYXHEIGHT, 1);
	this->m_DJYXList.ShowWindow(0);
	
	this->m_BtnXXYX.MoveWindow( BTNXXYXLEFT, 700-20*1+70, BTNXXYXWIDTH, BTNXXYXHEIGHT, 1);
	this->m_XXYXList.ShowWindow(0);
}

void CLinKGameExDlg::OnBtndjyx() 
{
	// TODO: Add your control notification handler code here
	this->m_LinKIE.Navigate( DJYXWEB, NULL, NULL, NULL, NULL);
	this->m_RoomList.ShowWindow(0);
	this->m_LinKIE.SetWidth( LINKIEWIDTH);
	this->m_LinKIE.SetHeight( LINKIEHEIGHT);

	this->m_WLDZList.ShowWindow(0);

	this->m_BtnWLYX.MoveWindow( BTNWLYXLEFT, BTNWLYXTOP, BTNWLYXWIDTH, BTNWLYXHEIGHT, 1);
	this->m_WLYXList.ShowWindow(0);

	this->m_BtnQPYX.MoveWindow( BTNQPYXLEFT, BTNQPYXTOP, BTNQPYXWIDTH, BTNQPYXHEIGHT, 1);
	this->m_QPYXList.ShowWindow(0);
	
	this->m_BtnDJYX.MoveWindow( BTNDJYXLEFT, BTNDJYXTOP, BTNDJYXWIDTH, BTNDJYXHEIGHT, 1);
	this->m_DJYXList.ShowWindow(1);
	
	this->m_BtnXXYX.MoveWindow( BTNXXYXLEFT, 700-20*1+70, BTNXXYXWIDTH, BTNXXYXHEIGHT, 1);
	this->m_XXYXList.ShowWindow(0);	
}

void CLinKGameExDlg::OnBtnxxyx() 
{
	// TODO: Add your control notification handler code here
	this->m_LinKIE.Navigate( XXYXWEB, NULL, NULL, NULL, NULL);
	this->m_RoomList.ShowWindow(0);
	this->m_LinKIE.SetWidth( LINKIEWIDTH);
	this->m_LinKIE.SetHeight( LINKIEHEIGHT);

	this->m_WLDZList.ShowWindow(0);

	this->m_BtnWLYX.MoveWindow( BTNWLYXLEFT, BTNWLYXTOP, BTNWLYXWIDTH, BTNWLYXHEIGHT, 1);
	this->m_WLYXList.ShowWindow(0);

	this->m_BtnQPYX.MoveWindow( BTNQPYXLEFT, BTNQPYXTOP, BTNQPYXWIDTH, BTNQPYXHEIGHT, 1);
	this->m_QPYXList.ShowWindow(0);
	
	this->m_BtnDJYX.MoveWindow( BTNDJYXLEFT, BTNDJYXTOP, BTNDJYXWIDTH, BTNDJYXHEIGHT, 1);
	this->m_DJYXList.ShowWindow(0);
	
	this->m_BtnXXYX.MoveWindow( BTNXXYXLEFT, BTNXXYXTOP, BTNXXYXWIDTH, BTNXXYXHEIGHT, 1);
	this->m_XXYXList.ShowWindow(1);
}

void CLinKGameExDlg::InitWLDZList()
{
	LoadGameList(this->m_WLDZList.m_hWnd, WANGLUODUIZHAN);
}

void CLinKGameExDlg::InitWLYXList()
{
	LoadGameList(this->m_WLYXList.m_hWnd, WANGLUOYOUXI);
}

void CLinKGameExDlg::InitQPYXList()
{
	LoadGameList(this->m_QPYXList.m_hWnd, QIPAIYOUXI);
}

void CLinKGameExDlg::InitDJYXList()
{
	LoadGameList(this->m_DJYXList.m_hWnd, DANJIYOUXI);
}

void CLinKGameExDlg::InitXXYXList()
{
	LoadGameList(this->m_XXYXList.m_hWnd, XIUXIANYOUXI);
}

void CLinKGameExDlg::LoadGameList(HWND This, int x)
{
	CoInitialize(NULL); 
	try
	{
		LV_ITEM lvitem;
		int i = 0, iPos;
		CString m_tempStr;
		if( WANGLUODUIZHAN == x){	m_WLDZList.InsertColumn(0, "Name", LVCFMT_LEFT, 110); m_tempStr = "WLDZ";}
		if( WANGLUOYOUXI == x)	{	m_WLYXList.InsertColumn(0, "Name", LVCFMT_LEFT, 110); m_tempStr = "WLYX";}

⌨️ 快捷键说明

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