⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fileproperty.cpp

📁 一个对系统执行文件提供方便管理的软件,里面用到的技术值得参考.
💻 CPP
字号:
// FileProperty.cpp : implementation file
//

#include "stdafx.h"
#include "PStart.h"
#include "FileProperty.h"
#include "PStartDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CFileProperty dialog
struct fp_info
{
	CString name;
	CString path;
};

CFileProperty::CFileProperty(CWnd* pParent /*=NULL*/)
	: CDialog(CFileProperty::IDD, pParent)
{
	//{{AFX_DATA_INIT(CFileProperty)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CFileProperty::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFileProperty)
	DDX_Control(pDX, IDC_TAB, m_tab);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CFileProperty, CDialog)
	//{{AFX_MSG_MAP(CFileProperty)
	ON_BN_CLICKED(IDC_OK, OnOk)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFileProperty message handlers

BOOL CFileProperty::OnInitDialog()
{  
	CDialog::OnInitDialog();

	CRect rect;

	m_page4.m_Name=m_name;   
	m_page4.m_Path=m_path;

    m_tab.InsertItem(0, _T("General"));
	m_tab.InsertItem(1, _T("Advanced"));

    m_page4.Create(IDD_PAGE4, GetDlgItem(IDC_TAB));

    m_tab.GetClientRect(&rect);
	rect.top+=26;
	rect.left+=1;
	rect.bottom-=8;
	rect.right-=1;
	m_page4.MoveWindow(&rect);
    
	m_tab.SetCurSel(0);
    m_page4.ShowWindow(TRUE);       
    
	return TRUE;

}


void CFileProperty::OnOk() 
{
	// TODO: Add your control notification handler code here
	CPStartDlg *pmaindlg; 
    fp_info fp;

	fp.name=m_page4.m_Name;
	fp.path=m_page4.m_Path;
  
	pmaindlg=(CPStartDlg*)AfxGetApp()->m_pMainWnd;
	if(pmaindlg)
      pmaindlg->SendMessage(WM_FILEPROPERTY, 0, (LPARAM)&fp); 
    
	this->SendMessage(WM_CLOSE);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -