📄 dlgmyteam.cpp
字号:
// DlgMyTeam.cpp : implementation file
//
#include "stdafx.h"
#include "LinKGameEx.h"
#include "DlgMyTeam.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgMyTeam dialog
CDlgMyTeam::CDlgMyTeam(CWnd* pParent /*=NULL*/)
: CDialog(CDlgMyTeam::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlgMyTeam)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDlgMyTeam::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgMyTeam)
DDX_Control(pDX, IDC_MYTREE, m_MyTree);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgMyTeam, CDialog)
//{{AFX_MSG_MAP(CDlgMyTeam)
ON_NOTIFY(NM_DBLCLK, IDC_MYTREE, OnDblclkMytree)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgMyTeam message handlers
BOOL CDlgMyTeam::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CRect m_Rect(0, 0, 0, 0);
GetParent()->GetClientRect(&m_Rect);
((CTabCtrl*)GetParent())->AdjustRect(false, &m_Rect);
MoveWindow(&m_Rect);
InitControl();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDlgMyTeam::OnDblclkMytree(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
HTREEITEM m_hItemEx = this->m_MyTree.GetSelectedItem();
CString m_strText = this->m_MyTree.GetItemText(m_hItemEx);
*pResult = 0;
}
void CDlgMyTeam::InitControl()
{
// 初始化控件
this->m_hItem = this->m_MyTree.InsertItem( "My_Team", TVI_ROOT); //在根结点上添加 "棋牌游戏"
this->m_OnehItem = this->m_MyTree.InsertItem( "流星蝴蝶剑_Team", m_hItem); //在根结点上添加 "棋牌游戏"
this->m_TwohItem = this->m_MyTree.InsertItem( "WT_Team", this->m_OnehItem);
this->m_ThreehItem = this->m_MyTree.InsertItem( "Member_A", this->m_TwohItem);
this->m_ThreehItem = this->m_MyTree.InsertItem( "Member_B", this->m_TwohItem);
this->m_TwohItem = this->m_MyTree.InsertItem( "JHL_Team", this->m_OnehItem);
this->m_ThreehItem = this->m_MyTree.InsertItem( "Member_A", this->m_TwohItem);
this->m_ThreehItem = this->m_MyTree.InsertItem( "Member_B", this->m_TwohItem);
this->m_OnehItem = this->m_MyTree.InsertItem( "CS1.5_Team", m_hItem); //在根结点上添加 "棋牌游戏"
this->m_TwohItem = this->m_MyTree.InsertItem( "WT_Team", this->m_OnehItem);
this->m_ThreehItem = this->m_MyTree.InsertItem( "Member_A", this->m_TwohItem);
this->m_ThreehItem = this->m_MyTree.InsertItem( "Member_B", this->m_TwohItem);
this->m_TwohItem = this->m_MyTree.InsertItem( "JHL_Team", this->m_OnehItem);
this->m_ThreehItem = this->m_MyTree.InsertItem( "Member_A", this->m_TwohItem);
this->m_ThreehItem = this->m_MyTree.InsertItem( "Member_B", this->m_TwohItem);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -