📄 coutdlg.cpp
字号:
// COutDlg.cpp : implementation file
//
#include "stdafx.h"
#include "linjunjuan.h"
#include "COutDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCOutDlg dialog
CCOutDlg::CCOutDlg(CWnd* pParent /*=NULL*/)
: CDialog(CCOutDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CCOutDlg)
m_relpath = _T("");
m_refpath = _T("");
m_check = FALSE;
//}}AFX_DATA_INIT
}
void CCOutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCOutDlg)
DDX_Text(pDX, IDC_EDIT1, m_relpath);
DDX_Text(pDX, IDC_EDIT2, m_refpath);
DDX_Check(pDX, IDC_CHECK1, m_check);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CCOutDlg, CDialog)
//{{AFX_MSG_MAP(CCOutDlg)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
ON_BN_CLICKED(IDC_CHECK1, OnCheck1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCOutDlg message handlers
void CCOutDlg::OnButton1()
{
char ext[] = "picture types (*.pic)|*.pic||";
CFileDialog dlg(TRUE,"pic" ,"*.pic",OFN_OVERWRITEPROMPT|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY ,ext, NULL);
if(dlg.DoModal()==IDOK)
{
m_relpath=dlg.GetPathName();
}
UpdateData(FALSE);
}
void CCOutDlg::OnButton2()
{
char ext[] = "picture types (*.pic)|*.pic||";
CFileDialog dlg(TRUE,"pic" ,"*.pic",OFN_OVERWRITEPROMPT|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY ,ext, NULL);
if(dlg.DoModal()==IDOK)
{
m_refpath=dlg.GetPathName();
}
UpdateData(FALSE);
}
void CCOutDlg::OnCheck1()
{
if(m_check==FALSE)
m_check=TRUE;
else
m_check=FALSE;
UpdateData(FALSE);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -