一些关于vc的问答

源代码在线查看: subject_28655.htm

软件大小: 8176 K
上传用户: RSY527
关键词: 问答
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				序号:28655 发表者:chejie 发表日期:2003-01-23 08:09:45
				主题:请问大家sleep()的头文件是什么?
				内容:谢谢!
				返回上页访问论坛
				
				
				回复者:天花乱坠 回复日期:2003-01-23 08:23:12
				内容:QuickInfo   Header: Declared in winbase.h.  Import Library: Use kernel32.lib.
				
				返回上页访问论坛
				
				
				回复者:bird 回复日期:2003-01-23 08:32:53
				内容:查查MSDN!
				
				返回上页访问论坛
				
				
				回复者:天才 回复日期:2003-01-23 10:39:25
				内容:Sleep第一个字母大写试试看
				
				返回上页访问论坛
				
				
				回复者:菜鸟也支招儿 回复日期:2003-01-23 13:38:20
				内容:是哪个呀?有两个呢!一个是:Sleep();另一个是:sleep();说是用什么头文件才可以,可是当你做工程的时候,工程本身自带的头文件其实已经包含了它用的头文件了。至少我在用Sleep()的时候就从没遇到过需要头文件的问题!
				
				返回上页访问论坛
				
				
				回复者:流诊圆 回复日期:2003-01-23 16:53:19
				内容:dos.h试试看
				
				返回上页访问论坛
				
				
				回复者:chejie 回复日期:2003-01-23 17:52:02
				内容:没有windows.h头文件真的不行!我加了windows.h就可以了。我是做个简单的DLL而已。Sleep()和sleep有什么不同吗?
				
				返回上页访问论坛
				
				
				回复者:tigersky2000 回复日期:2003-01-24 16:56:28
				内容:sleep不是C++中的,是java中的吧,没学过java,我想应该是Package java.lang.thread.sleep 这样的吧
				
				返回上页访问论坛
				
				
				回复者:林 回复日期:2003-01-28 11:59:31
				内容:Sleep(100) 不用include任何头文件
				
				返回上页访问论坛
				
				
				答案被接受回复者:吴澄埃 回复日期:2003-01-28 20:13:28
				内容:这是它的系统要求,头文件及LIB:  Windows NT/2000: Requires Windows NT 3.1 or later.  Windows 95/98: Requires Windows 95 or later.  Header: Declared in Winbase.h; include Windows.h.  Library: Use Kernel32.lib.下面是它的功用:The Sleep function suspends the execution of the current thread for the specified interval. To enter an alertable wait state, use the SleepEx function. VOID Sleep(  DWORD dwMilliseconds   // sleep time);ParametersdwMilliseconds [in] Specifies the time, in milliseconds, for which to suspend execution. A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution. A value of INFINITE causes an infinite delay. Return ValuesThis function does not return a value. RemarksA thread can relinquish the remainder of its time slice by calling this function with a sleep time of zero milliseconds. You have to be careful when using Sleep and code that directly or indirectly creates windows. If a thread creates any windows, it must process messages. Message broadcasts are sent to all windows in the system. If you have a thread that uses Sleep with infinite delay, the system will deadlock. Two examples of code that indirectly creates windows are DDE and COM CoInitialize. Therefore, if you have a thread that creates windows, use MsgWaitForMultipleObjects or MsgWaitForMultipleObjectsEx, rather than Sleep.MAPI: For more information, see Syntax and Limitations for Win32 Functions Useful in MAPI Development.呵呵,给分呵:)
				
				返回上页访问论坛
				
				
				回复者:tigersky2000 回复日期:2003-01-28 20:28:29
				内容:^C&^V就想要分!好歹给人家翻译一下嘛 :)
				
				返回上页访问论坛
				
				
				回复者:吴澄埃 回复日期:2003-01-29 09:31:06
				内容:不会吧,这些专业英语都看不懂,你是怎么出来混的。要不要培训?呵呵:)
				
				返回上页访问论坛
				
				
				回复者:蓝色狂想 回复日期:2003-02-01 22:18:17
				内容:还用我的偶像的头像
				
				返回上页访问论坛
							

相关资源