choosetypedlg.cpp

来自「该项目是为PPC(PocketPc)使用者提供方便的理财事务.如,现金的借贷,债」· C++ 代码 · 共 83 行

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

#include "stdafx.h"
#include "MoneyAnyWhere.h"
#include "ChooseTypeDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CChooseTypeDlg dialog


CChooseTypeDlg::CChooseTypeDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CChooseTypeDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CChooseTypeDlg)
	m_iRadioType = -1;
	//}}AFX_DATA_INIT
}


void CChooseTypeDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CChooseTypeDlg)
	DDX_Radio(pDX, IDC_RADIO_CASH, m_iRadioType);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CChooseTypeDlg, CDialog)
	//{{AFX_MSG_MAP(CChooseTypeDlg)
	ON_BN_CLICKED(ID_ACCOUNTOK, OnAccountok)
	ON_BN_CLICKED(ID_ACCOUNTCANCEL, OnAccountcancel)
	ON_BN_CLICKED(ID_ACCOUNTHELP, OnAccounthelp)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CChooseTypeDlg message handlers

void CChooseTypeDlg::OnAccountok() 
{
	UpdateData(true);
	CString str;
	str.Format(L"%d",m_iRadioType);
	AfxMessageBox(str);
	if(m_iRadioType==-1)
	{
		AfxMessageBox(L"请选择一种帐户类型!");
		return ;
	}
	CDialog::OnOK();
	
}

void CChooseTypeDlg::OnAccountcancel() 
{
	CDialog::OnCancel();
	
}

void CChooseTypeDlg::OnAccounthelp() 
{
	AfxMessageBox(L"这里是帮助!!");	
}

void CChooseTypeDlg::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	CRect	rect;
	this->GetClientRect(&rect);
	CBrush	*pBrush = new CBrush(COLORREF(RGB(227,234,206)));
	dc.FillRect(rect,pBrush);	
	dc.SetBkColor(COLORREF(RGB(227,234,206)));
}

⌨️ 快捷键说明

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