?? savedialog.cpp
字號:
// SaveDialog.cpp : implementation file
//
#include "stdafx.h"
#include "convert.h"
#include "SaveDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSaveDialog dialog
CSaveDialog::CSaveDialog(CWnd* pParent /*=NULL*/)
: CDialog(CSaveDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CSaveDialog)
m_filename = _T("");
m_ImgHeight = 0;
m_ImgWidth = 0;
//}}AFX_DATA_INIT
}
void CSaveDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSaveDialog)
DDX_Text(pDX, IDC_FILENAME, m_filename);
DDX_Text(pDX, IDC_HEIGHT, m_ImgHeight);
DDX_Text(pDX, IDC_WIDTH, m_ImgWidth);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSaveDialog, CDialog)
//{{AFX_MSG_MAP(CSaveDialog)
ON_BN_CLICKED(IDC_BUTTON1, OnButtonSelect)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSaveDialog message handlers
BOOL CSaveDialog::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
/////add the filedialog select to the main-dialog
void CSaveDialog::OnButtonSelect()
{
// TODO: Add your control notification handler code here
CFileDialog selectFile(FALSE,NULL,NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"Tif Files (*.tif)|*.tif|Pic Files (*.pic)|*.pic|All files (*.*)||",NULL);
if(selectFile.DoModal()==IDOK)
{
m_filename=selectFile.GetPathName();
UpdateData(FALSE);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -