status.cpp

来自「IO函数调用测试」· C++ 代码 · 共 59 行

CPP
59
字号
// Status.cpp : implementation file
//

#include "stdafx.h"
#include "IOExplorer.h"
#include "format.h"
#include "Status.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CStatus

CStatus::CStatus()
{
}

CStatus::~CStatus()
{
}


BEGIN_MESSAGE_MAP(CStatus, CEdit)
	//{{AFX_MSG_MAP(CStatus)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CStatus message handlers

/****************************************************************************
*                           CStatus::SetWindowText
* Inputs:
*       DWORD err: Error code
* Result: void
*
* Effect: 
*       Sets the window text.  If the error code is 0, the text is cleared
*	If the FormatMessage call fails, a string "? %d ?" is displayed
****************************************************************************/

void CStatus::SetWindowText(DWORD err)
    {
     if(err == 0)
        { /* no error */
	 CEdit::SetWindowText(_T(""));
	} /* no error */
     else
        { /* has error */
	 CString s = formatError(err);
	 CEdit::SetWindowText(s);
	} /* has error */
    }

⌨️ 快捷键说明

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