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

📄 prop1.cpp

📁 基于omnet++开发的Mf框架下的802.11协议仿真。
💻 CPP
字号:
// Prop1.cpp : implementation file
//

#include "stdafx.h"
#include "table2.h"
#include "Prop1.h"

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

/////////////////////////////////////////////////////////////////////////////
// CProp1 property page

IMPLEMENT_DYNCREATE(CProp1, CPropertyPage)

CProp1::CProp1() : CPropertyPage(CProp1::IDD)
{
	//{{AFX_DATA_INIT(CProp1)
	m_path = _T("");
	//}}AFX_DATA_INIT
}

CProp1::~CProp1()
{
}

void CProp1::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CProp1)
	DDX_Text(pDX, IDC_EDIT1, m_path);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CProp1, CPropertyPage)
	//{{AFX_MSG_MAP(CProp1)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CProp1 message handlers

void CProp1::OnButton1() 
{
	// TODO: Add your control notification handler code here
	BROWSEINFO bi;
	char path[MAX_PATH];
	LPITEMIDLIST pbi;
	ZeroMemory(&bi,sizeof(BROWSEINFO));
	bi.pszDisplayName = path;
	pbi = SHBrowseForFolder(&bi);
	SHGetPathFromIDList(pbi,path);
	m_path = path;
	UpdateData(false);
	DlgDirList(LPTSTR(path),IDC_LIST1,0,DDL_READWRITE | DDL_SYSTEM | DDL_DIRECTORY | DDL_ARCHIVE);

}

void CProp1::OnButton2() 
{
	// TODO: Add your control notification handler code here

	//WinExec(m_path+"Uedit32.exe"
	//	,SW_SHOW); 

	PROCESS_INFORMATION   pi;   
          STARTUPINFO   si;   
          si.cb   =   sizeof(STARTUPINFO);   
          si.lpReserved   =   NULL;   
          si.lpDesktop   =   NULL;   
          si.lpTitle   =   NULL;   
          si.dwFlags   =   0;   
          si.cbReserved2   =   0;   
          si.lpReserved2   =   NULL;   
          BOOL   bres   =   CreateProcess("E:\\Program Files\\IDM Computer Solutions\\UltraEdit-32\\Uedit32.exe",NULL,NULL,NULL,true,   
             CREATE_NEW_CONSOLE ,//CREATE_SEPARATE_WOW_VDM,NORMAL_PRIORITY_CLASS,   
             NULL,NULL,&si,&pi);   
  if(bres==false)   
  {   
  AfxMessageBox("CreateProcess   failed");   
  }   

}

void CProp1::OnButton3() 
{
	// TODO: Add your control notification handler code here
	ShellExecute(NULL,   "open",   "d:\\out.txt",   NULL,   NULL,   SW_SHOW);   
}

⌨️ 快捷键说明

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