⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 assert.h

📁 网页游戏赤壁
💻 H
字号:
/*==========================================================================
 *
 *  Copyright (C) 1995 Microsoft Corporation. All Rights Reserved.
 *
 *  File:       Assert.h
 *  Content:    assert header
 *
 ***************************************************************************/
#ifndef __ASSERT_INCLUDED__
#define __ASSERT_INCLUDED__

#ifdef _DEBUG
#define _ASSERT_      // Enable the Assert() macro
#endif

#include <windows.h>

// display error message and quit at last
// hwnd		:	hangle window to display error
// code		:	error code
// message	:	error message
// filename	:	if the message needs filename, the filename
void ErrorMessage( HWND hwnd, int code, LPCTSTR message, LPCTSTR filename=NULL);

///////////
// display error message without quit the process
// hwnd		:	hangle window to display error
// code		:	error code
// message	:	error message
// filename	:	if the message needs filename, the filename
void ErrorMessageNoQuit( HWND hwnd, int code, LPCTSTR message, LPCTSTR filename=NULL);

// output debug message
// nNum		:	value to output
// pStr		:	devide symbles after the value
// nHex		:	decimal or hex value to display
void OutputString( int nNum, char *pStr, int nHex = 10 );

void WriteLogFile( LPCTSTR filename, LPCTSTR str );

//added by tian yue.
void WriteErrorFile(LPCTSTR filename,WORD str);

#ifdef _ASSERT_

void AssertFail(char [], char [], int, char[]);
#define Assert(f) ((f) ? (void)NULL : (void)AssertFail(#f, __FILE__, __LINE__,NULL))
#define AssertMessage(f, szMessage) ((f) ? (void)NULL : (void)AssertFail(#f, __FILE__, __LINE__, szMessage))

#else
#define Assert(f) (void)NULL        // Macro that does nothing
#define AssertMessage(f, szMessage) (void)NULL  

#endif // ~ASSERT

#endif

⌨️ 快捷键说明

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