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

📄 dialog4.cpp

📁 密钥的管理中心
💻 CPP
字号:
// Dialog4.cpp : implementation file
//

#include "stdafx.h"
#include "bishe.h"
#include "Dialog4.h"


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

/////////////////////////////////////////////////////////////////////////////
// CDialog4 dialog


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


void CDialog4::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDialog4)
	DDX_Control(pDX, IDC_TAB1, m_tabctrl);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDialog4, CDialog)
	//{{AFX_MSG_MAP(CDialog4)
	ON_NOTIFY(TCN_SELCHANGE, IDC_TAB1, OnSelchangeTab1)
	ON_BN_CLICKED(IDC_exit_BUTTON1, OnexitBUTTON1)
	ON_BN_CLICKED(IDC_OUT_BUTTON2, OnOutButton2)
	
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDialog4 message handlers

BOOL CDialog4::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
    CRect r;
    m_tabctrl.GetClientRect (&r);

    TCITEM item;
	item.mask = TCIF_TEXT;

	item.pszText = "常规";
	m_tabctrl.InsertItem (0,&item);

	item.pszText ="详细信息";
	m_tabctrl.InsertItem (1,&item);

    item.pszText ="路径";
	m_tabctrl.InsertItem (2,&item);


	m_mm5.Create (IDD_CERVIEW2,&m_tabctrl);
	m_mm6.Create (IDD_CERVIEW3,&m_tabctrl);
    m_mm7.Create (IDD_CERVIEW4,&m_tabctrl);

	m_mm5.SetWindowPos (NULL,10,30,r.right -20,r.bottom -40,SWP_SHOWWINDOW );
	m_mm6.SetWindowPos (NULL,10,30,r.right -20,r.bottom -20,SWP_HIDEWINDOW ); 
	m_mm7.SetWindowPos (NULL,10,30,r.right -20,r.bottom -20,SWP_HIDEWINDOW ); 

	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDialog4::OnSelchangeTab1(NMHDR* pNMHDR, LRESULT* pResult) 
{
	// TODO: Add your control notification handler code here

    CRect r;
    m_tabctrl.GetClientRect (&r);

    switch(m_tabctrl.GetCurSel())
	{
	case 0:
	m_mm5.SetWindowPos (NULL,10,30,r.right -20,r.bottom -40,SWP_SHOWWINDOW);
	m_mm6.SetWindowPos (NULL,10,30,r.right -20,r.bottom -40,SWP_HIDEWINDOW); 
	m_mm7.SetWindowPos (NULL,10,30,r.right -20,r.bottom -40,SWP_HIDEWINDOW);  
	break;
	case 1:
	m_mm5.SetWindowPos (NULL,10,30,r.right -20,r.bottom -40,SWP_HIDEWINDOW);
	m_mm6.SetWindowPos (NULL,10,30,r.right -20,r.bottom -40,SWP_SHOWWINDOW); 
	m_mm7.SetWindowPos (NULL,10,30,r.right -20,r.bottom -40,SWP_HIDEWINDOW); 
    break;
    case 2:
	m_mm5.SetWindowPos (NULL,10,30,r.right -20,r.bottom -40,SWP_HIDEWINDOW);
	m_mm6.SetWindowPos (NULL,10,30,r.right -20,r.bottom -40,SWP_HIDEWINDOW); 
	m_mm7.SetWindowPos (NULL,10,30,r.right -20,r.bottom -40,SWP_SHOWWINDOW); 
    break;
	}

	
	*pResult = 0;

}

void CDialog4::OnexitBUTTON1() 
{
	// TODO: Add your control notification handler code here
	OnCancel();
}


void CDialog4::OnOutButton2() 
{
	// TODO: Add your control notification handler code here
	CCeroutguide m_outguide;
	m_outguide.DoModal();
	return;
}

⌨️ 快捷键说明

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