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

📄 newassetdealdlg.cpp

📁 该项目是为PPC(PocketPc)使用者提供方便的理财事务.如,现金的借贷,债务处理,证券买卖,以及物品管 理等等。该项目的主要用户群是:PPC使用者.
💻 CPP
字号:
// NewAssetDealDlg.cpp : implementation file
//

#include "stdafx.h"
#include "MoneyAnyWhere.h"
#include "NewAssetDealDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CNewAssetDealDlg dialog


CNewAssetDealDlg::CNewAssetDealDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CNewAssetDealDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CNewAssetDealDlg)
	m_iDealMoney = 0;
	m_strDealAccount = _T("");
	m_strDealTarget = _T("");
	m_strCategory = _T("");
	//}}AFX_DATA_INIT
}


void CNewAssetDealDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CNewAssetDealDlg)
	DDX_Control(pDX, IDC_COMBO_CATEGORY, m_ctrComboBox);
	DDX_Text(pDX, IDC_EDIT_DEALMONEY, m_iDealMoney);
	DDX_Text(pDX, IDC_EDIT_DEALACCOUNT, m_strDealAccount);
	DDX_Text(pDX, IDC_EDIT_DEALTARGET, m_strDealTarget);
	DDX_CBString(pDX, IDC_COMBO_CATEGORY, m_strCategory);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CNewAssetDealDlg, CDialog)
	//{{AFX_MSG_MAP(CNewAssetDealDlg)
	ON_BN_CLICKED(IDC_BTNCANEL1, OnBtncanel1)
	ON_BN_CLICKED(IDC_BTNHELP1, OnBtnhelp1)
	ON_BN_CLICKED(IDC_BTNOK1, OnBtnok1)
	ON_WM_PAINT()
	ON_EN_SETFOCUS(IDC_EDIT_DEALMONEY, OnSetfocusEditDealmoney)
	ON_EN_KILLFOCUS(IDC_EDIT_DEALMONEY, OnKillfocusEditDealmoney)
	ON_EN_SETFOCUS(IDC_EDIT_DEALTARGET, OnSetfocusEditDealtarget)
	ON_EN_KILLFOCUS(IDC_EDIT_DEALTARGET, OnKillfocusEditDealtarget)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CNewAssetDealDlg message handlers

void CNewAssetDealDlg::OnBtncanel1() 
{
	CDialog::OnCancel();
	// TODO: Add your control notification handler code here
	
}

void CNewAssetDealDlg::OnBtnhelp1() 
{
	AfxMessageBox(L"帮助!");
	// TODO: Add your control notification handler code here
	
}

void CNewAssetDealDlg::OnBtnok1() 
{
	UpdateData(true);
	GetDlgItemText(IDC_DATETIMEPICKER_DEALDATE,m_strDealTime);
	GetDlgItemText(IDC_DATETIMEPICKER_BACKDEALDATE,m_strBackDealTime);
	m_strInOrOut = Query(m_strCategory);
	CDialog::OnOK();
	// TODO: Add your control notification handler code here
	
	
}

BOOL CNewAssetDealDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	
	if(!Init())
		return false;
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CNewAssetDealDlg::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	CRect	rect;
	this->GetClientRect(&rect);
	CBrush	*pBrush = new CBrush(COLORREF(RGB(222,215,181)));
	dc.FillRect(rect,pBrush);	
}


BOOL CNewAssetDealDlg::Init()
{
	m_ctrComboBox.InsertString(0,L"借入");
	m_ctrComboBox.InsertString(1,L"借出");
	return TRUE;
}

CString CNewAssetDealDlg::Query(CString m_strCategory)
{
	CString str;
	if(m_strCategory == L"借入")
		str = L"in";
	else
		str = L"out";
	return str;
}

void CNewAssetDealDlg::OnSetfocusEditDealmoney() 
{
	SHSipPreference(m_hWnd, SIP_UP);
	// TODO: Add your control notification handler code here
	
}

void CNewAssetDealDlg::OnKillfocusEditDealmoney() 
{
	SHSipPreference(m_hWnd, SIP_DOWN);
	// TODO: Add your control notification handler code here
	
}

void CNewAssetDealDlg::OnSetfocusEditDealtarget() 
{
	SHSipPreference(m_hWnd, SIP_UP);
	// TODO: Add your control notification handler code here
	
}

void CNewAssetDealDlg::OnKillfocusEditDealtarget() 
{
	SHSipPreference(m_hWnd, SIP_DOWN);
	// TODO: Add your control notification handler code here
	
}

⌨️ 快捷键说明

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