📄 datadialog.cpp
字号:
// DataDialog.cpp : implementation file
//
#include "stdafx.h"
#include "TestRFCard.h"
#include "DataDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDataDialog dialog
CDataDialog::CDataDialog(CWnd* pParent /*=NULL*/)
: CDialog(CDataDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CDataDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDataDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDataDialog)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDataDialog, CDialog)
//{{AFX_MSG_MAP(CDataDialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDataDialog message handlers
void CDataDialog::OnOK()
{
CString strData;
char pszData[32];
double x;
m_nMoney = 0;
GetDlgItem(IDC_EDIT_TEXT)->GetWindowText(strData);
if(false == strData.IsEmpty())
{
x = atof((LPCTSTR)strData)*100;
sprintf(pszData,"%f",x);
m_nMoney = atol(pszData);
}
CDialog::OnOK();
}
void CDataDialog::SetPromptText(LPCTSTR pszPrompt)
{
GetDlgItem(IDC_STATIC_TITLE)->SetWindowText(pszPrompt);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -