plugunplugsample.cpp

来自「BCAM 1394 Driver」· C++ 代码 · 共 66 行

CPP
66
字号
//-----------------------------------------------------------------------------
//  (c) 2002 by Basler Vision Technologies
//  Section:  Vision Components
//  Project:  BCAM
//  $Header: PlugUnplugSample.cpp, 3, 02.10.2002 11:40:50, Nebelung, H.$
//-----------------------------------------------------------------------------
/**
  \file     PlugUnplugSample.cpp
  \brief    main source file for PlugUnplugSample.exe
*/

#include "stdafx.h"

#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>


#include "resource.h"

#include "MainFrm.h"

/// The one and only application module
CAppModule _Module;

/// The function running the message loop.
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
  CMessageLoop theLoop;
  _Module.AddMessageLoop(&theLoop);
  
  CMainFrame wndMain;
  
  if(wndMain.CreateEx() == NULL)
  {
    ATLTRACE(_T("Main window creation failed!\n"));
    return 0;
  }
  
  wndMain.ShowWindow(nCmdShow);
  
  int nRet = theLoop.Run();
  
  _Module.RemoveMessageLoop();
  return nRet;
}

/// Windows entry function
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
{
  HRESULT hRes = ::CoInitialize(NULL);
  ATLASSERT(SUCCEEDED(hRes));
  
  ::InitCommonControls();
  
  hRes = _Module.Init(NULL, hInstance);
  ATLASSERT(SUCCEEDED(hRes));
  
  int nRet = Run(lpstrCmdLine, nCmdShow);
  
  _Module.Term();
  ::CoUninitialize();
  
  return nRet;
}

⌨️ 快捷键说明

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