utility.h
来自「A arithmetical resolution about Hanoi to」· C头文件 代码 · 共 42 行
H
42 行
#if !defined (_UTILITY_H_)
#define _UTILITY_H_
/////////////////////////////////////////////////////////////////////////////
// Utility functions
/* Function prototypes */
LPCTSTR getAppName () ;
LPCTSTR getHelpFileName () ;
BOOL centerWindow (HWND hwndCentered, HWND hwndPreferredOwner) ;
#define DIM(a) (sizeof (a) / sizeof (a[0]))
/////////////////////////////////////////////////////////////////////////////
// Diagnostic functions
#ifdef _DEBUG
/* Function prototypes */
BOOL assertFailedOnLine (LPCSTR lpszFileName, int nLine);
#define THIS_FILE __FILE__
#define ASSERT(f) \
do { \
if (!(f) && assertFailedOnLine (THIS_FILE, __LINE__)) \
FatalExit (0); \
} while (0) \
#define VERIFY(f) ASSERT(f)
#else // _DEBUG
#define ASSERT(f) ((void)0)
#define VERIFY(f) ((void)(f))
#endif // !_DEBUG
#endif /* _UTILITY_H_ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?