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

📄 dllpath2.cpp

📁 VC++实现的预测控制
💻 CPP
字号:
// DLLPATH2.cpp : implementation file
//

#include "stdafx.h"
#include "MPCTest.h"
#include "DLLPATH2.h"
//#include "afx.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CString FilePath;
/////////////////////////////////////////////////////////////////////////////
// CDLLPATH dialog
double ComputeTime;
CString DllPathname;
extern CString IniPathName;
CDLLPATH::CDLLPATH(CWnd* pParent /*=NULL*/)
	: CDialog(CDLLPATH::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDLLPATH)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CDLLPATH::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDLLPATH)
	   DDX_Text(pDX,IDC_DLLPATH,m_dllpath);
	   DDX_Text(pDX,IDC_INIPATH,m_inipath);
       DDX_Text(pDX, IDC_ARITH, m_suanfa);
	   DDX_Control(pDX, IDCANCEL, m_btnCancel);
	   DDX_Control(pDX, IDOK,m_btnOK);
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDLLPATH, CDialog)
	//{{AFX_MSG_MAP(CDLLPATH)
		// NOTE: the ClassWizard will add message map macros here
		ON_BN_CLICKED(IDC_FINDDLLPATH,OnFindDllpath)
		ON_BN_CLICKED(IDC_FINDINIPATH,OnFindInipath)
        //ON_BN_CLICKED(IDC_FINDINIPATH,OnFindInipath)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDLLPATH message handlers
BOOL CDLLPATH::OnInitDialog() 
{
   CDialog::OnInitDialog();
   m_dllpath = " ";
   m_inipath = " ";
   m_suanfa = 1.0;
   UpdateData(0);
   return TRUE;
}
void CDLLPATH::OnOK()
{
	
	ComputeTime = m_suanfa;
	CDialog::OnOK();
}
void CDLLPATH::OnCancel()
{
	ComputeTime = m_suanfa;
	CDialog::OnCancel();
}
void CDLLPATH::OnFindDllpath()
{
    CFileDialog LoadFileDlg(true,NULL,NULL,OFN_READONLY|OFN_LONGNAMES|OFN_HIDEREADONLY|OFN_EXTENSIONDIFFERENT,"configure Files (*.dll)|*.dll||All Files (*.*)|*.*||",NULL);	//文件对话框
	LoadFileDlg.m_ofn.lpstrTitle="提取配置文件"; 
	
	if(LoadFileDlg.DoModal()!=0)
    {
		UpdateData();
	    m_dllpath = LoadFileDlg.m_ofn.lpstrFile;
	}
	DllPathname = m_dllpath;
	UpdateData(0);
}
void CDLLPATH::OnFindInipath()
{
	CFileDialog LoadFileDlg(true,NULL,NULL,OFN_READONLY|OFN_LONGNAMES|OFN_HIDEREADONLY|OFN_EXTENSIONDIFFERENT,"configure Files (*.ini)|*.ini||All Files (*.*)|*.*||",NULL);	//文件对话框
	LoadFileDlg.m_ofn.lpstrTitle="提取配置文件"; 
	
	if(LoadFileDlg.DoModal()!=0)
    {
		UpdateData();
	    m_inipath = LoadFileDlg.m_ofn.lpstrFile;
		
	}
	FilePath = LoadFileDlg.m_ofn.lpstrFile;
	IniPathName = FilePath;
	 
    UpdateData(0);
}

⌨️ 快捷键说明

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