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

📄 assetmodifydlg.cpp

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

#include "stdafx.h"
#include "MoneyAnyWhere.h"
#include "AssetModifyDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CAssetModifyDlg dialog


CAssetModifyDlg::CAssetModifyDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CAssetModifyDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CAssetModifyDlg)
	m_strCategory = _T("");
	m_iAmount = 0;
	m_strAccountName = _T("");
	m_strTarget = _T("");
	//}}AFX_DATA_INIT
}


void CAssetModifyDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAssetModifyDlg)
	DDX_Control(pDX, IDC_COMBO_CATEGORY, m_ctrComboBox);
	DDX_CBString(pDX, IDC_COMBO_CATEGORY, m_strCategory);
	DDX_Text(pDX, IDC_EDIT_AMOUNT, m_iAmount);
	DDX_Text(pDX, IDC_EDIT_ASSNAME, m_strAccountName);
	DDX_Text(pDX, IDC_EDIT_TARGET, m_strTarget);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAssetModifyDlg, CDialog)
	//{{AFX_MSG_MAP(CAssetModifyDlg)
	ON_BN_CLICKED(IDC_BTNCANCEL1, OnBtncancel1)
	ON_BN_CLICKED(IDC_BTNHELP1, OnBtnhelp1)
	ON_BN_CLICKED(IDC_BTNMODIFY, OnBtnmodify)
	ON_EN_SETFOCUS(IDC_EDIT_AMOUNT, OnSetfocusEditAmount)
	ON_EN_KILLFOCUS(IDC_EDIT_AMOUNT, OnKillfocusEditAmount)
	ON_EN_SETFOCUS(IDC_EDIT_TARGET, OnSetfocusEditTarget)
	ON_EN_KILLFOCUS(IDC_EDIT_TARGET, OnKillfocusEditTarget)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAssetModifyDlg message handlers

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

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

void CAssetModifyDlg::OnBtnmodify() 
{
	UpdateData(true);
	GetDlgItemText(IDC_DATETIMEPICKER_DATE,m_strTime);
	GetDlgItemText(IDC_DATETIMEPICKER_BACKDATE,m_strBackTime);
	m_strInOrOut = Query(m_strCategory);
	CDialog::OnOK();
	// TODO: Add your control notification handler code here
	
}

BOOL CAssetModifyDlg::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
}


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

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

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

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

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

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

void CAssetModifyDlg::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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -