📄 inirwdlg.cpp
字号:
// InirwDlg.cpp : implementation file
//
#include "stdafx.h"
#include "Inirw.h"
#include "InirwDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CInirwDlg dialog
CInirwDlg::CInirwDlg(CWnd* pParent /*=NULL*/)
: CDialog(CInirwDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CInirwDlg)
m_Edit1 = _T("");
m_Edit2 = _T("");
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CInirwDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CInirwDlg)
DDX_Text(pDX, IDC_EDIT_1, m_Edit1);
DDX_Text(pDX, IDC_EDIT_2, m_Edit2);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CInirwDlg, CDialog)
//{{AFX_MSG_MAP(CInirwDlg)
ON_BN_CLICKED(IDC_BUTTON_READ, OnButtonRead)
ON_BN_CLICKED(IDC_BUTTON_WRITE, OnButtonWrite)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CInirwDlg message handlers
BOOL CInirwDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
CenterWindow(GetDesktopWindow()); // center to the hpc screen
// TODO: Add extra initialization here
IniFile.SetFileName("\\祑盒2\\SetData.ini");
return TRUE; // return TRUE unless you set the focus to a control
}
void CInirwDlg::OnButtonRead()
{
m_Edit1=IniFile.GetString("Edit1", "Edit1", "0");
m_Edit2=IniFile.GetString("Edit2", "Edit2", "0");
UpdateData(false);
}
void CInirwDlg::OnButtonWrite()
{
UpdateData();
IniFile.SetString("Edit1", "Edit1", m_Edit1 );
IniFile.SetString("Edit2", "Edit2", m_Edit2 );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -