errorbox.cpp

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

CPP
46
字号
//-----------------------------------------------------------------------------
//  (c) 2002 by Basler Vision Technologies
//  Section:  Vision Components
//  Project:  BCAM
//  $Header: ErrorBox.cpp, 4, 04.12.2002 16:36:38, Happe, A.$
//-----------------------------------------------------------------------------
/**
\file     ErrorBox.cpp
*
* \brief Implementation of the CErrorBox class
*
*/
//-----------------------------------------------------------------------------

// ErrorBox.cpp: implementation of the CErrorBox class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "resource.h"
#include "ErrorBox.h"


LRESULT CErrorBox::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
  CenterWindow(GetParent());
  return TRUE;
}

LRESULT CErrorBox::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
  DestroyWindow();
  return 0;
}

void CErrorBox::ReportError(BcamException &e)
{
  SetActiveWindow();
  MessageBeep(0);
  CString msg;
  CString description = e.Description();
  description.TrimRight();
  msg.Format("%s\n(0x%08x, %s).", description, e.Error(), e.Context());
  ::SetWindowText(GetDlgItem(IDC_STATICMESSAGE), msg);
  UpdateWindow();
}

⌨️ 快捷键说明

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