📄 thirddlg.cpp
字号:
// ThirdDlg.cpp : implementation file
//
#include "stdafx.h"
#include "atrkfax.h"
#include "ThirdDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CThirdDlg dialog
CThirdDlg::CThirdDlg(CWnd* pParent /*=NULL*/)
: CDialog(CThirdDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CThirdDlg)
m_strRecFile = _T("");
m_strRecPath = _T("");
//}}AFX_DATA_INIT
}
void CThirdDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CThirdDlg)
DDX_Control(pDX, IDC_3DLG_CMB_FAXCH, m_cmbFaxCh);
DDX_Text(pDX, IDC_EDIT_REC_FILE, m_strRecFile);
DDX_Text(pDX, IDC_EDIT_REC_PATH, m_strRecPath);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CThirdDlg, CDialog)
//{{AFX_MSG_MAP(CThirdDlg)
ON_BN_CLICKED(IDC_BTN_REC_PATH, OnBtnRecPath)
ON_EN_CHANGE(IDC_EDIT_REC_FILE, OnChangeEditRecFile)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CThirdDlg message handlers
void CThirdDlg::OnOK()
{
// TODO: Add extra validation here
//CDialog::OnOK();
}
void CThirdDlg::OnCancel()
{
// TODO: Add extra cleanup here
//CDialog::OnCancel();
}
void CThirdDlg::OnBtnRecPath()
{
char t[] = "请选择存放接收传真文件的路径";
BROWSEINFO bi;
LPMALLOC pMalloc;
if(SUCCEEDED(SHGetMalloc(&pMalloc)))
{
ZeroMemory(&bi,sizeof(bi));
bi.hwndOwner = NULL;
bi.pszDisplayName = 0;
bi.lpszTitle = t;
bi.pidlRoot = 0;
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = BrowseCallbackProc;
LPITEMIDLIST pidl = SHBrowseForFolder(&bi);
if(pidl)
{
if(SHGetPathFromIDList(pidl, m_strRecPath.GetBuffer(MAX_PATH)) )
{
//sprintf(szRecFile,,m_strRecPath);
UpdateData(FALSE);
}
pMalloc->Free(pidl);
pMalloc->Release();
}
}
}
void CThirdDlg::OnChangeEditRecFile()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -