資源簡介
在VS2013的開發環境下編寫的galil運控平臺的示例代碼。可以實時顯示當前位置,設置運動方向、運動速度和距離。
代碼片段和文件信息
//?HdsGalilExample.cpp?:?定義應用程序的類行為。
//
#include?“stdafx.h“
#include?“HdsGalilExample.h“
#include?“HdsGalilExampleDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CHdsGalilExampleApp
BEGIN_MESSAGE_MAP(CHdsGalilExampleApp?CWinApp)
ON_COMMAND(ID_HELP?&CWinApp::onhelp)
END_MESSAGE_MAP()
//?CHdsGalilExampleApp?構造
CHdsGalilExampleApp::CHdsGalilExampleApp()
{
//?支持重新啟動管理器
m_dwRestartManagerSupportFlags?=?AFX_RESTART_MANAGER_SUPPORT_RESTART;
//?TODO:??在此處添加構造代碼,
//?將所有重要的初始化放置在?InitInstance?中
}
//?唯一的一個?CHdsGalilExampleApp?對象
CHdsGalilExampleApp?theApp;
//?CHdsGalilExampleApp?初始化
BOOL?CHdsGalilExampleApp::InitInstance()
{
//?如果一個運行在?Windows?XP?上的應用程序清單指定要
//?使用?ComCtl32.dll?版本?6?或更高版本來啟用可視化方式,
//則需要?InitCommonControlsEx()。??否則,將無法創建窗口。
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?將它設置為包括所有要在應用程序中使用的
//?公共控件類。
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
AfxEnableControlContainer();
//?創建?shell?管理器,以防對話框包含
//?任何?shell?樹視圖控件或?shell?列表視圖控件。
CShellManager?*pShellManager?=?new?CShellManager;
//?激活“Windows?Native”視覺管理器,以便在?MFC?控件中啟用主題
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
//?標準初始化
//?如果未使用這些功能并希望減小
//?最終可執行文件的大小,則應移除下列
//?不需要的特定初始化例程
//?更改用于存儲設置的注冊表項
//?TODO:??應適當修改該字符串,
//?例如修改為公司或組織名
SetRegistryKey(_T(“應用程序向導生成的本地應用程序“));
CHdsGalilExampleDlg?dlg;
m_pMainWnd?=?&dlg;
INT_PTR?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:??在此放置處理何時用
//??“確定”來關閉對話框的代碼
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:??在此放置處理何時用
//??“取消”來關閉對話框的代碼
}
else?if?(nResponse?==?-1)
{
TRACE(traceAppMsg?0?“警告:?對話框創建失敗,應用程序將意外終止。\n“);
TRACE(traceAppMsg?0?“警告:?如果您在對話框上使用?MFC?控件,則無法?#define?_AFX_NO_MFC_CONTROLS_IN_DIALOGS。\n“);
}
//?刪除上面創建的?shell?管理器。
if?(pShellManager?!=?NULL)
{
delete?pShellManager;
}
//?由于對話框已關閉,所以將返回?FALSE?以便退出應用程序,
//??而不是啟動應用程序的消息泵。
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????..A..H.?????54272??2018-07-13?17:36??示例源代碼\HdsGalilExample?VC2013\.vs\HdsGalilExample\v15\.suo
?????文件???77062144??2018-07-13?17:36??示例源代碼\HdsGalilExample?VC2013\.vs\HdsGalilExample\v15\Browse.VC.db
?????文件?????680960??2015-10-27?03:09??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\gclib.dll
?????文件??????29107??2015-10-22?01:01??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\gclib.h
?????文件???????4178??2015-10-27?03:08??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\gclib.lib
?????文件??????14848??2015-10-27?03:09??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\gclibo.dll
?????文件??????13132??2015-10-22?01:01??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\gclibo.h
?????文件???????4962??2015-10-27?03:09??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\gclibo.lib
?????文件???????4264??2015-10-16?23:25??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\gclib_errors.h
?????文件??????45128??2015-10-27?03:06??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\gclib_record.h
?????文件??????93084??2018-07-12?11:12??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\HdsGalilExample.aps
?????文件???????2491??2015-12-09?18:15??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\HdsGalilExample.cpp
?????文件????????497??2015-12-09?18:15??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\HdsGalilExample.h
?????文件??????12286??2017-02-13?11:06??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\HdsGalilExample.rc
?????文件???????6559??2018-07-12?11:11??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\HdsGalilExample.vcxproj
?????文件???????2580??2015-12-09?18:27??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\HdsGalilExample.vcxproj.filters
?????文件????????165??2018-07-12?11:21??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\HdsGalilExample.vcxproj.user
?????文件??????11512??2018-07-12?15:16??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\HdsGalilExampleDlg.cpp
?????文件???????1852??2017-08-28?09:08??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\HdsGalilExampleDlg.h
?????文件???????4188??2015-12-09?18:15??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\ReadMe.txt
?????文件??????67777??2013-07-22?01:18??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\res\HdsGalilExample.ico
?????文件????????686??2015-12-09?18:15??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\res\HdsGalilExample.rc2
?????文件???????3088??2017-02-13?11:24??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\resource.h
?????文件????????148??2015-12-09?18:15??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\stdafx.cpp
?????文件???????1578??2015-12-09?18:15??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\stdafx.h
?????文件????????234??2015-12-09?18:15??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample\targetver.h
?????文件???70254592??2018-01-12?10:07??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample.sdf
?????文件????????991??2015-12-09?18:15??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample.sln
????..A..H.?????40448??2018-01-12?10:07??示例源代碼\HdsGalilExample?VC2013\HdsGalilExample.v12.suo
?????文件????3735552??2018-01-12?10:07??示例源代碼\HdsGalilExample?VC2013\ipch\hdsgalilexample-d6632cc6\hdsgalilexample-9dfc0320.ipch
............此處省略12個文件信息
評論
共有 條評論