資源簡介
vs2005編寫的Trio控件應用例子,xp系統測試通過。
代碼片段和文件信息
//?AxisParameterPage.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“TrioPC_Test.h“
#include?“GlobalDefs.h“
#include?“Trio.h“
#include?“AxisParameterPage.h“
#include?“.\axisparameterpage.h“
//?CAxisParameterPage?dialog
const?char?CAxisParameterPage::mc_Param1Names[][mc_nNameLength]?=?{
“ATYPE“?“P_GAIN“?“I_GAIN“?“D_GAIN“?“OV_GAIN“?“VFF_GAIN“?“UNITS“?“SPEED“
“ACCEL“?“DECEL“?“CREEP“?“JOGSPEED“?“FE_LIMIT“?“DAC“?“SERVO“?“REP_DIST“
“FWD_IN“?“REV_IN“?“DATUM_IN“?“FH_IN“?“FS_LIMIT“?“RS_LIMIT“
};
const?char?CAxisParameterPage::mc_Param2Names[][mc_nNameLength]?=?{
“MTYPE“?“NTYPE“?“MPOS“?“DPOS“?“FE“?“AXISSTATUS“?“VPSPEED“
};
IMPLEMENT_DYNAMIC(CAxisParameterPage?CAxPropertyPage)
CAxisParameterPage::CAxisParameterPage()
:?CAxPropertyPage(CAxisParameterPage::IDD)
?m_uAxis(0)
{
}
CAxisParameterPage::~CAxisParameterPage()
{
}
void?CAxisParameterPage::DoDataExchange(CDataExchange*?pDX)
{
CAxPropertyPage::DoDataExchange(pDX);
DDX_Control(pDX?IDC_Params1?m_lcParams1);
DDX_Control(pDX?IDC_Params2?m_lcParams2);
DDX_Text(pDX?IDC_Axis?m_uAxis);
}
BEGIN_MESSAGE_MAP(CAxisParameterPage?CAxPropertyPage)
END_MESSAGE_MAP()
//?CAxisParameterPage?message?handlers
void?CAxisParameterPage::Refresh()
{
if?(m_pTrioPC?!=?NULL?&&?m_pTrioPC->IsOpen(0))
{
COleSafeArray sabases;
DWORD dwArrayElements[1];
double *pdData;
dwArrayElements[0]?=?1;
sabases.Create(VT_R8?1?dwArrayElements);
sabases.AccessData((void**)&pdData);
if?(pdData?!=?NULL)
{
*pdData?=?(double)m_uAxis;
}
sabases.UnaccessData();
if?(m_pTrioPC->base(1?sabases))
{
CString strValue;
double dValue;
int nEntries
nEntry;
LVITEM ItemInfo;
nEntries?=?sizeof(mc_Param1Names)?/?sizeof(mc_Param1Names[0]);
for?(?nEntry?=?0;?nEntry? {
if?(m_pTrioPC->GetVariable(mc_Param1Names[nEntry]?&dValue))
strValue.Format(“%.4lf“?dValue);
else
strValue.Empty();
ItemInfo.mask?=?LVIF_TEXT;
ItemInfo.iItem?=?nEntry;
ItemInfo.iSubItem?=?1;
ItemInfo.cchTextMax?=?strValue.GetLength();
ItemInfo.pszText?=?strValue.GetBuffer();
m_lcParams1.SetItem(&ItemInfo);
strValue.ReleaseBuffer();
}
nEntries?=?sizeof(mc_Param2Names)?/?sizeof(mc_Param2Names[0]);
for?(?nEntry?=?0;?nEntry? {
if?(m_pTrioPC->GetVariable(mc_Param2Names[nEntry]?&dValue))
strValue.Format(“%.4lf“?dValue);
else
strValue.Empty();
ItemInfo.mask?=?LVIF_TEXT;
ItemInfo.iItem?=?nEntry;
ItemInfo.iSubItem?=?1;
ItemInfo.cchTextMax?=?strValue.GetLength();
ItemInfo.pszText?=?strValue.GetBuffer();
m_lcParams2.SetItem(&ItemInfo);
strValue.ReleaseBuffer();
}
}?//?if?(m_pTrioPC->SetVariable(“base“?m_uAxis))
}?//?if?(m_pTrioPC?!=?NULL?&&?m_pTrioPC->IsOpen())
UpdateData(UD_TO_GUI);
}
BOOL
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???18312192??2013-08-21?17:06??ActiveXTestVCpp\ActiveXTestVCPP.ncb
?????文件????????897??2013-08-20?18:44??ActiveXTestVCpp\ActiveXTestVCPP.sln
????..A..H.?????17408??2013-08-21?17:06??ActiveXTestVCpp\ActiveXTestVCPP.suo
?????文件???????4468??2003-11-18?15:48??ActiveXTestVCpp\TrioPC_Test\AxisParameterPage.cpp
?????文件????????731??2003-11-18?15:48??ActiveXTestVCpp\TrioPC_Test\AxisParameterPage.h
?????文件????????569??2003-11-18?15:48??ActiveXTestVCpp\TrioPC_Test\AxPropertyPage.cpp
?????文件????????458??2003-11-18?15:48??ActiveXTestVCpp\TrioPC_Test\AxPropertyPage.h
?????文件???????2008??2004-06-29?11:47??ActiveXTestVCpp\TrioPC_Test\ChangeVRDlg.cpp
?????文件????????759??2004-06-29?11:42??ActiveXTestVCpp\TrioPC_Test\ChangeVRDlg.h
?????文件???????8134??2003-11-18?15:48??ActiveXTestVCpp\TrioPC_Test\ColorButton.cpp
?????文件???????2206??2003-11-18?15:48??ActiveXTestVCpp\TrioPC_Test\ColorButton.h
?????文件???????1670??2003-11-18?15:48??ActiveXTestVCpp\TrioPC_Test\Colours.h
?????文件????2965504??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\ActiveXTestVCPP.exe
?????文件????????146??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\ActiveXTestVCPP.exe.em
?????文件????????212??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\ActiveXTestVCPP.exe.em
?????文件????????145??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\ActiveXTestVCPP.exe.intermediate.manifest
?????文件????5855416??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\ActiveXTestVCPP.ilk
?????文件???18153472??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\ActiveXTestVCPP.pch
?????文件???11070464??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\ActiveXTestVCPP.pdb
?????文件??????83803??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\AxisParameterPage.obj
?????文件??????22439??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\AxPropertyPage.obj
?????文件??????13346??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\BuildLog.htm
?????文件??????62714??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\ChangeVRDlg.obj
?????文件??????55085??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\ColorButton.obj
?????文件??????64410??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\DirectoryPage.obj
?????文件??????58450??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\EditListCtrl.obj
?????文件??????85545??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\IOPage.obj
?????文件??????96984??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\MovesPage.obj
?????文件?????????65??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\mt.dep
?????文件??????65651??2013-08-21?16:51??ActiveXTestVCpp\TrioPC_Test\Debug\StatusPage.obj
............此處省略56個文件信息
- 上一篇:筆試面試精華題目修改版
- 下一篇:MapDownloader
評論
共有 條評論