📄 bcamtopologyviewer.cpp
字号:
//-----------------------------------------------------------------------------
// (c) 2002 by Basler Vision Technologies
// Section: Vision Components
// Project: BCAM
// $Header: BCAMTopologyViewer.cpp, 3, 03.12.2002 14:40:23, Albrecht, M.$
//-----------------------------------------------------------------------------
/**
\file BCAMTopologyViewer.cpp
*
* \brief main source file for BCAMTopologyViewer.exe
*
* WTL wizard generated File holding the Run and _tWinMain Method of
* the BCAMTopologyViewer.exe
*/
//-----------------------------------------------------------------------------
#include "stdafx.h"
#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>
#include <atlctrlw.h>
#include "resource.h"
#include "aboutdlg.h"
#include "maindlg.h"
CAppModule _Module;
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
CMessageLoop theLoop;
_Module.AddMessageLoop(&theLoop);
CMainDlg dlgMain;
if(dlgMain.Create(NULL) == NULL)
{
ATLTRACE(_T("Main dialog creation failed!\n"));
// Generated with WTL 7 the creation fails if the control is not available
::MessageBox(NULL,"Main dialog creation failed!\n Check if the BCAMTopologyView.dll is available and registered by regsvr32", "Error",MB_OK);
return 0;
}
dlgMain.ShowWindow(nCmdShow);
int nRet = theLoop.Run();
_Module.RemoveMessageLoop();
return nRet;
}
BOOL Is_WinXP ()
{
OSVERSIONINFO osvi;
DWORDLONG dwlConditionMask = 0;
// Initialize the OSVERSIONINFOEX structure.
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx (&osvi);
return ((osvi.dwPlatformId >= VER_PLATFORM_WIN32_WINDOWS) &&
(osvi.dwMajorVersion >= 5) && (osvi.dwMinorVersion >= 1) );
}
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
{
// step 1 Make sure that the program is running under XP
if (! Is_WinXP())
{
::MessageBox(NULL, "WinXP required", "BcamTopologyViewer", MB_OK);
return ERROR_OLD_WIN_VERSION;
}
HRESULT hRes = ::CoInitialize(NULL);
// If you are running on NT 4.0 or higher you can use the following call instead to
// make the EXE free threaded. This means that calls come in on a random RPC thread.
// HRESULT hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
ATLASSERT(SUCCEEDED(hRes));
#if (_WIN32_IE >= 0x0300)
INITCOMMONCONTROLSEX iccx;
iccx.dwSize = sizeof(iccx);
iccx.dwICC = ICC_COOL_CLASSES | ICC_BAR_CLASSES;
BOOL bRet = ::InitCommonControlsEx(&iccx);
bRet;
ATLASSERT(bRet);
#else
::InitCommonControls();
#endif
hRes = _Module.Init(NULL, hInstance);
ATLASSERT(SUCCEEDED(hRes));
AtlAxWinInit();
int nRet = Run(lpstrCmdLine, nCmdShow);
_Module.Term();
::CoUninitialize();
return nRet;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -