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

📄 choose.cpp

📁 一个实用的GIS系统的系统维护模块
💻 CPP
字号:
// Choose.cpp : implementation file
//

#include "stdafx.h"
#include "yhgl.h"
#include "Choose.h"
#include "UseDlg.h"
#include "SyDlg.h"
#include "Tree.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
int sign=0;
/////////////////////////////////////////////////////////////////////////////
// CChoose dialog


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


void CChoose::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CChoose)
	DDX_Control(pDX, ID_BTN_GO, m_ensure);
	DDX_Control(pDX, IDCANCEL, m_cancel);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CChoose, CDialog)
	//{{AFX_MSG_MAP(CChoose)
	ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
	ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
	ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
	ON_BN_CLICKED(ID_BTN_GO, OnBtnGo)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CChoose message handlers

void CChoose::OnRadio1() 
{
   sign=1;
}

void CChoose::OnRadio2() 
{
	sign=2;	
}

void CChoose::OnRadio3() 
{
    sign=3;	
}

//进行操作
void CChoose::OnBtnGo()
{
	UpdateData();
	if (sign <= 0)
	{
		MessageBox ("请选择一个操作类型!","提示:",MB_OK|MB_ICONEXCLAMATION);
		return;
	}
	
	//数据集信息
	if(sign==1)
	{
		//CTree *dlg = new CTree; dlg->Create();
		CTree dlg;
		dlg.transID=QID;
		dlg.DoModal();
	}
	
	//用户信息维护
    if(sign==2)
	{
		CUseDlg *dlg = new CUseDlg;
		dlg->Create();
		//dlg.DoModal();
	}

	//权限组信息维护
	if(sign==3)
	{
		CSyDlg *dlg = new CSyDlg;
		dlg->Create();
	}
}

void CChoose::OnOK() 
{
	CDialog::OnOK();
}

BOOL CChoose::OnInitDialog() 
{
	CDialog::OnInitDialog();
	m_ensure.OffsetColor(CButtonST::BTNST_COLOR_BK_IN, 30);
	m_ensure.SetBkColor(RGB(145,190,211));
	m_ensure.SetTooltipText(_T("选择操作类型"));
	m_ensure.SetRounded(TRUE);
    m_cancel.OffsetColor(CButtonST::BTNST_COLOR_BK_IN, 30);
	m_cancel.SetBkColor(RGB(145,190,211));
	m_cancel.SetTooltipText(_T("退出"));
	m_cancel.SetRounded(TRUE);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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