stdafx.h

来自「2005年10月份自写的细菌分割、标号与面积统计程序。带测试图像」· C头文件 代码 · 共 53 行

H
53
字号
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__2567F57A_85B7_4F2E_A813_375EA52BC831__INCLUDED_)
#define AFX_STDAFX_H__2567F57A_85B7_4F2E_A813_375EA52BC831__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>			// MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

#include "dibapi.h"
#include "math.h"
#include "time.h"
#include <sys/timeb.h>



//定义了两个宏,用来计算并显示某段计算步骤所经历的时间
#define TimeCountStart CTime startTime = CTime::GetCurrentTime();\
	struct _timeb timebuffer;\
	int mills1,mills2;\
    _ftime(&timebuffer);\
	mills1=timebuffer.millitm;\
	CString str;\

#define TimeCountEnd CTime endTime = CTime::GetCurrentTime();\
	CTimeSpan elapsedTime = endTime - startTime;\
    _ftime(&timebuffer);\
	mills2=timebuffer.millitm;\
	long int timeused;\
	timeused=elapsedTime.GetTotalSeconds();\
	if (mills1<=mills2)\
		timeused=timeused*1000+(mills2-mills1);\
	else\
		timeused=(timeused-1)*1000+(mills1-mills2);\
	str.Format ("该步骤所用时间:%d 毫秒",timeused);\
    ::AfxMessageBox(str); 
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__2567F57A_85B7_4F2E_A813_375EA52BC831__INCLUDED_)

⌨️ 快捷键说明

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