destroylosetypeselect.cpp

来自「码头手持机项目,用于统计集装箱,轮船的情况,手持机采用S3C2440处理器,数据」· C++ 代码 · 共 83 行

CPP
83
字号
// DestroyLoseTypeSelect.cpp : implementation file
//

#include "stdafx.h"
#include "CTSClient.h"
#include "DestroyLoseTypeSelect.h"

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

/////////////////////////////////////////////////////////////////////////////
// DestroyLoseTypeSelect dialog


DestroyLoseTypeSelect::DestroyLoseTypeSelect(CWnd* pParent /*=NULL*/)
	: CDialog(DestroyLoseTypeSelect::IDD, pParent)
{
	//{{AFX_DATA_INIT(DestroyLoseTypeSelect)
		// NOTE: the ClassWizard will add member initialization here
    modify = false; 
	destroyLoseTypeString = _T("");
	//}}AFX_DATA_INIT
}


void DestroyLoseTypeSelect::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(DestroyLoseTypeSelect)
	DDX_Control(pDX, IDC_COMBO1, m_destroyloseType);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(DestroyLoseTypeSelect, CDialog)
	//{{AFX_MSG_MAP(DestroyLoseTypeSelect)
	ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// DestroyLoseTypeSelect message handlers

void DestroyLoseTypeSelect::OnButton4() 
{
	// TODO: Add your control notification handler code here
	modify = false;
	CDialog::OnCancel();
}

void DestroyLoseTypeSelect::OnButton1() 
{
	// TODO: Add your control notification handler code here
	modify = true;
    UpdateData(true);
	int selectIndex = 0;
	CString selectText = _T("");	
	selectIndex = m_destroyloseType.GetCurSel();
	m_destroyloseType.GetLBText(selectIndex,selectText);
	destroyLoseTypeString = selectText;
	UpdateData(false);
	CDialog::OnOK();
}

BOOL DestroyLoseTypeSelect::OnInitDialog() 
{
	CDialog::OnInitDialog();
    
	modify = false;
	UpdateData(true);
	m_destroyloseType.SetCurSel(0);	
	UpdateData(false);
	
	// TODO: Add extra initialization here
	
	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 + =
减小字号Ctrl + -
显示快捷键?