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

📄 selectappdlg.cpp

📁 这是本人两年前兼职为某个公司做的石油钻进设计软件
💻 CPP
字号:
// SelectAppDlg.cpp : implementation file
//

#include "stdafx.h"
#include "cvenus.h"
#include "SelectAppDlg.h"
#include "Splash.h"  // e.g. splash.h

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

/////////////////////////////////////////////////////////////////////////////
// CSelectAppDlg dialog


CSelectAppDlg::CSelectAppDlg(CWnd* pParent /*=NULL*/)
	: CBitmapDialog(CSelectAppDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSelectAppDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
	SetBitmap(IDB_SETUP);
}


void CSelectAppDlg::DoDataExchange(CDataExchange* pDX)
{
	CBitmapDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSelectAppDlg)
	DDX_Control(pDX, IDC_LIST1, m_list);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSelectAppDlg, CBitmapDialog)
	//{{AFX_MSG_MAP(CSelectAppDlg)
	ON_LBN_DBLCLK(IDC_LIST1, OnDblclkList1)
	ON_BN_CLICKED(IDC_OK, OnOk)
	ON_BN_CLICKED(IDC_EXIT, OnExit)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSelectAppDlg message handlers

BOOL CSelectAppDlg::OnInitDialog() 
{
	CBitmapDialog::OnInitDialog();
	CSplashWnd::ShowSplashScreen(this);
	
	// TODO: Add extra initialization here
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	m_list.AddString(_T("完井管柱强度设计"));
	m_list.AddString(_T("射孔设计"));
	m_list.AddString(_T("采气工艺方案设计及分析"));
	m_list.AddString(_T("水合物预测及防治"));
	m_list.SetCurSel(0);

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

void CSelectAppDlg::OnOK() 
{
	int m_iIndex = m_list.GetCurSel();
	if(m_iIndex == LB_ERR)
		OnCancel();
	else
	{
		switch(m_iIndex)
		{
		case 0:
			m_iResult = 3;
			break;
		case 1:
			m_iResult = 1;
			break;
		case 2:
			m_iResult = 0;
			break;
		case 3:
			m_iResult = 2;
			break;
		}
		CBitmapDialog::OnOK();
	}
}


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

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

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

⌨️ 快捷键说明

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