📄 fax2bmpdlg.cpp
字号:
// Fax2BmpDlg.cpp : implementation file
//
#include "stdafx.h"
#include "atrkfax.h"
#include "Fax2BmpDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFax2BmpDlg dialog
CFax2BmpDlg::CFax2BmpDlg(CWnd* pParent /*=NULL*/)
: CDialog(CFax2BmpDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CFax2BmpDlg)
m_strBmpFile = _T("");
m_strSrcFile = _T("");
//}}AFX_DATA_INIT
}
void CFax2BmpDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFax2BmpDlg)
DDX_Text(pDX, IDC_EDIT_BMP_FILE, m_strBmpFile);
DDX_Text(pDX, IDC_EDIT_SRC_FILE, m_strSrcFile);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CFax2BmpDlg, CDialog)
//{{AFX_MSG_MAP(CFax2BmpDlg)
ON_BN_CLICKED(IDC_SRC_FAX_BUTTON, OnSrcFaxButton)
ON_BN_CLICKED(IDC_BMP_FILE_BUTTON, OnBmpFileButton)
ON_BN_CLICKED(IDC_MAKE_FAX_FILE, OnMakeFaxFile)
ON_BN_CLICKED(IDC_CONVERT_BUTTON, OnConvertButton)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFax2BmpDlg message handlers
void CFax2BmpDlg::OnSrcFaxButton()
{
// TODO: Add your control notification handler code here
/* CFileDialog cf(1,NULL,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,"fax file(*.fax)|*.fax|",NULL);
char path[200];
strcpy(path,CurPath);
strcat(path,"\\FaxFile");
cf.m_ofn .lpstrInitialDir = path;
if(cf.DoModal() == IDOK)
{
strcpy(m_SrcFile.GetBuffer(250), cf.GetPathName());
UpdateData(FALSE);
}
*/
}
void CFax2BmpDlg::OnBmpFileButton()
{
// TODO: Add your control notification handler code here
/* CFileDialog cf(0,".bmp",NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,"Bmp file(*.bmp)|*.bmp|",NULL);
cf.m_ofn.lpstrTitle = "转换到文件";
char path[200];
strcpy(path,CurPath);
strcat(path,"\\FaxFile");
cf.m_ofn.lpstrInitialDir = path;
if(cf.DoModal() == IDOK)
{
strcpy(m_BmpFile.GetBuffer(250), cf.GetPathName());
UpdateData(FALSE);
}
*/
}
void CFax2BmpDlg::OnMakeFaxFile()
{
// TODO: Add your control notification handler code here
/* CFileDialog cf(0,".fax",NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,"Fax file(*.fax)|*.fax|",NULL);
char path[200];
strcpy(path,CurPath);
strcat(path,"\\FaxFile");
cf.m_ofn.lpstrInitialDir = path;
if(cf.DoModal() == IDOK)
{
char fnfax[250];
strcpy(fnfax, cf.GetPathName());
CFileFind cff;
if( cff.FindFile(fnfax,0) )
CFile::Remove(fnfax);
char fnbmp[250];
strcpy(fnbmp,CurPath);
strcat(fnbmp,"\\FaxFile\\Contract.bmp");
myMakeFaxFile(fnbmp, fnfax);
}
*/
}
void CFax2BmpDlg::OnConvertButton()
{
// TODO: Add your control notification handler code here
/* if( !strlen(m_SrcFile) )
{
AfxMessageBox("请先输入源FAX文件名!",MB_OK);
return;
}
else if( !strlen(m_BmpFile) )
{
AfxMessageBox("请先输入目标BMP文件名!",MB_OK);
return;
}
fBmp_ConvertFaxToBmp(m_SrcFile.GetBuffer(250), m_BmpFile.GetBuffer(250));
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -