📄 new.cpp
字号:
// NEW.cpp : implementation file
//
#include "stdafx.h"
#include "ooo.h"
#include "NEW.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CNEW dialog
CNEW::CNEW(CWnd* pParent /*=NULL*/)
: CDialog(CNEW::IDD, pParent)
{gread=0;
//{{AFX_DATA_INIT(CNEW)
m_file = _T("");
m_path = _T("C:\\aa");
//}}AFX_DATA_INIT
}
void CNEW::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CNEW)
DDX_Text(pDX, IDC_EDIT1, m_file);
DDX_Text(pDX, IDC_EDIT2, m_path);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CNEW, CDialog)
//{{AFX_MSG_MAP(CNEW)
ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
ON_BN_CLICKED(IDC_RADIO5, OnRadio5)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CNEW message handlers
void CNEW::OnRadio1()
{
gread=1;
}
void CNEW::OnRadio2()
{
gread=2;
}
void CNEW::OnRadio3()
{
gread=3;
}
void CNEW::OnRadio4()
{
gread=4;
}
void CNEW::OnRadio5()
{
gread=5;
}
void CNEW::OnButton1()
{BROWSEINFO bi;
ITEMIDLIST*pidl;
bi.hwndOwner=m_hWnd;
bi.pidlRoot=0;
bi.pszDisplayName=dispname;
bi.lpszTitle="选择文件路径";
bi.ulFlags=BIF_RETURNONLYFSDIRS;
bi.lpfn=0;
bi.lParam=0;
bi.iImage=0;
if(pidl=SHBrowseForFolder(&bi))
{SHGetPathFromIDList(pidl,path);
m_path.Format("%s",path);}
UpdateData(false);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -