谁能告诉我windows.h中有哪些函数,他们有哪些功能????

有没有具体的函数?
好像还有个messagebox,怎么用啊

幽居古藤
好像system()在 stdlib.h中有啊
里面是dos命令

是的当你调用Dos命令的时候你就要用到windows.h这个头文件吧

/*++ BUILD Version: 0001 Increment this if a change has global effects

Copyright (c) 1985-1997, Microsoft Corporation

Module Name:

windows.h

Abstract:

Master include file for Windows applications.

--*/

#ifndef _WINDOWS_
#define _WINDOWS_

#ifndef WINVER
#define WINVER 0x0400
#else
#if defined(_WIN32_WINNT) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400)
#error WINVER setting conflicts with _WIN32_WINNT setting
#endif
#endif

#if(WINVER >= 0x0500)
#pragma message ("")
#pragma message ("NOTE: WINVER has been defined as 0x0500 or greater which enables")
#pragma message ("Windows NT 5.0 and Windows 98 features. When these headers were released,")
#pragma message ("Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.")
#pragma message ("")
#pragma message ("For this release when WINVER is defined as 0x0500 or greater, you can only")
#pragma message ("build beta or test applications. To build a retail application,")
#pragma message ("set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk")
#pragma message ("to see if retail Windows NT 5.0 or Windows 98 headers are available.")
#pragma message ("")
#pragma message ("See the SDK release notes for more information.")
#pragma message ("")
#endif

#ifndef _INC_WINDOWS
#define _INC_WINDOWS

#if defined (_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif

/* If defined, the following flags inhibit definition
* of the indicated items.
*
* NOGDICAPMASKS - CC_*, LC_*, PC_*, CP_*, TC_*, RC_
* NOVIRTUALKEYCODES - VK_*
* NOWINMESSAGES - WM_*, EM_*, LB_*, CB_*
* NOWINSTYLES - WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_*
* NOSYSMETRICS - SM_*
* NOMENUS - MF_*
* NOICONS - IDI_*
* NOKEYSTATES - MK_*
* NOSYSCOMMANDS - SC_*
* NORASTEROPS - Binary and Tertiary raster ops
* NOSHOWWINDOW - SW_*
* OEMRESOURCE - OEM Resource values
* NOATOM - Atom Manager routines
* NOCLIPBOARD - Clipboard routines
* NOCOLOR - Screen colors
* NOCTLMGR - Control and Dialog routines
* NODRAWTEXT - DrawText() and DT_*
* NOGDI - All GDI defines and routines
* NOKERNEL - All KERNEL defines and routines
* NOUSER - All USER defines and routines
* NONLS - All NLS defines and routines
* NOMB - MB_* and MessageBox()
* NOMEMMGR - GMEM_*, LMEM_*, GHND, LHND, associated routines
* NOMETAFILE - typedef METAFILEPICT
* NOMINMAX - Macros min(a,b) and max(a,b)
* NOMSG - typedef MSG and associated routines
* NOOPENFILE - OpenFile(), OemToAnsi, AnsiToOem, and OF_*
* NOSCROLL - SB_* and scrolling routines
* NOSERVICE - All Service Controller routines, SERVICE_ equates, etc.
* NOSOUND - Sound driver routines
* NOTEXTMETRIC - typedef TEXTMETRIC and associated routines
* NOWH - SetWindowsHook and WH_*
* NOWINOFFSETS - GWL_*, GCL_*, associated routines
* NOCOMM - COMM driver routines
* NOKANJI - Kanji support stuff.
* NOHELP - Help engine interface.
* NOPROFILER - Profiler interface.
* NODEFERWINDOWPOS - DeferWindowPos routines
* NOMCX - Modem Configuration Extensions
*/

#if defined(RC_INVOKED) && !defined(NOWINRES)

#include <winresrc.h>

#else

#if defined(RC_INVOKED)
/* Turn off a bunch of stuff to ensure that RC files compile OK. */
#define NOATOM
#define NOGDI
#define NOGDICAPMASKS
#define NOMETAFILE
#define NOMINMAX
#define NOMSG
#define NOOPENFILE
#define NORASTEROPS
#define NOSCROLL
#define NOSOUND
#define NOSYSMETRICS
#define NOTEXTMETRIC
#define NOWH
#define NOCOMM
#define NOKANJI
#define NOCRYPT
#define NOMCX
#endif

#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_MIPS_) && !defined(_X86_) && defined(_M_IX86)
#define _X86_
#endif

#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_MRX000)
#define _MIPS_
#endif

#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_ALPHA)
#define _ALPHA_
#endif

#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_PPC)
#define _PPC_
#endif

#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_M68K)
#define _68K_
#endif

#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_MPPC)
#define _MPPC_
#endif

#ifndef _MAC
#if defined(_68K_) || defined(_MPPC_)
#define _MAC
#endif
#endif

#ifndef RC_INVOKED
#if ( _MSC_VER >= 800 )
#pragma warning(disable:4001)
#pragma warning(disable:4201)
#pragma warning(disable:4214)
#pragma warning(disable:4514)
#endif
#include <excpt.h>
#include <stdarg.h>
#endif /* RC_INVOKED */

#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#ifdef _MAC
DECLARE_HANDLE(HKEY);
typedef HKEY *PHKEY;
#endif
#if !defined(_MAC) || defined(_WIN32NLS)
#include <winnls.h>
#endif
#ifndef _MAC
#include <wincon.h>
#include <winver.h>
#endif
#if !defined(_MAC) || defined(_WIN32REG)
#include <winreg.h>
#endif
#ifndef _MAC
#include <winnetwk.h>
#endif

#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
#include <dlgs.h>
#ifndef _MAC
#include <lzexpand.h>
#include <mmsystem.h>
#include <nb30.h>
#include <rpc.h>
#endif
#include <shellapi.h>
#ifndef _MAC
#include <winperf.h>

#if(_WIN32_WINNT >= 0x0400)
#include <winsock2.h>
#include <mswsock.h>
#else
#include <winsock.h>
#endif /* _WIN32_WINNT >= 0x0400 */

#endif
#ifndef NOCRYPT
#include <wincrypt.h>
#endif

#ifndef NOGDI
#include <commdlg.h>
#ifndef _MAC
#include <winspool.h>
#ifdef INC_OLE1
#include <ole.h>
#else
#include <ole2.h>
#endif /* !INC_OLE1 */
#endif /* !MAC */
#endif /* !NOGDI */
#endif /* WIN32_LEAN_AND_MEAN */

#ifdef _MAC
#include <winwlm.h>
#endif

#ifdef INC_OLE2
#include <ole2.h>
#endif /* INC_OLE2 */

#ifndef _MAC
#ifndef NOSERVICE
#include <winsvc.h>
#endif

#if(WINVER >= 0x0400)
#ifndef NOMCX
#include <mcx.h>
#endif /* NOMCX */

#ifndef NOIME
#include <imm.h>
#endif
#endif /* WINVER >= 0x0400 */
#endif

#ifndef RC_INVOKED
#if ( _MSC_VER >= 800 )
#pragma warning(default:4001)
#pragma warning(default:4201)
#pragma warning(default:4214)
/* Leave 4514 disabled. It's a stupid warning anyway. */
#endif
#endif /* RC_INVOKED */

#endif /* RC_INVOKED */

#endif /* _INC_WINDOWS */
#endif /* _WINDOWS_ */

就这么些东西,可以控制文本和背景颜色,以及有一个清屏函数

有这个函数的,>
好像是用来还回到界面一个信息的
system("cls");//清屏,等于在DOS上使用cls命令

system("color 8B"); //控制屏幕颜色
BLACK 0 黑 两者均可
BLUE 1 兰 两者均可
GREEN 2 绿 两者均可
CYAN 3 青 两者均可
RED 4 红 两者均可
MAGENTA 5 洋红 两者均可
BROWN 6 棕 两者均可
LIGHTGRAY 7 淡灰 两者均可
DARKGRAY 8 深灰 只用于字符
LIGHTBLUE 9 淡兰 只用于字符
LIGHTGREEN a 淡绿 只用于字符
LIGHTCYAN b 淡青 只用于字符
LIGHTRED c 淡红 只用于字符
LIGHTMAGENTA d 淡洋红 只用于字符
YELLOW e 黄 只用于字符
WHITE f 白 只用于字符
(颜色可能有错)
温馨提示:内容为网友见解,仅供参考
第1个回答  2007-12-30
最主要的一些:
WINDEF.H 基本型态定义。
WINNT.H 支援Unicode的型态定义。
WINBASE.H Kernel函式。
WINUSER.H 使用者介面函式。
WINGDI.H 图形装置介面函式。
打开windows.h看看就知道了。
第2个回答  2019-10-09
是的当你调用dos命令的时候你就要用到windows.h这个头文件吧/*++nbsp;buildnbsp;version:nbsp;0001nbsp;nbsp;nbsp;nbsp;incrementnbsp;thisnbsp;ifnbsp;anbsp;changenbsp;hasnbsp;globalnbsp;effectscopyrightnbsp;(c)nbsp;1985-1997,nbsp;microsoftnbsp;corporationmodulenbsp;name:nbsp;nbsp;nbsp;nbsp;windows.habstract:nbsp;nbsp;nbsp;nbsp;masternbsp;includenbsp;filenbsp;fornbsp;windowsnbsp;applications.--*/#ifndefnbsp;_windows_#definenbsp;_windows_#ifndefnbsp;winver#definenbsp;winvernbsp;0x0400#elsenbsp;#ifnbsp;defined(_win32_winnt)nbsp;amp;amp;nbsp;(winvernbsp;amp;lt;nbsp;0x0400)nbsp;amp;amp;nbsp;(_win32_winntnbsp;amp;gt;nbsp;0x0400)#errornbsp;winvernbsp;settingnbsp;conflictsnbsp;withnbsp;_win32_winntnbsp;setting#endif#endif#if(winvernbsp;amp;gt;=nbsp;0x0500)#pragmanbsp;messagenbsp;(““)#pragmanbsp;messagenbsp;(“note:nbsp;winvernbsp;hasnbsp;beennbsp;definednbsp;asnbsp;0x0500nbsp;ornbsp;greaternbsp;whichnbsp;enables“)#pragmanbsp;messagenbsp;(“windowsnbsp;ntnbsp;5.0nbsp;andnbsp;windowsnbsp;98nbsp;features.nbsp;whennbsp;thesenbsp;headersnbsp;werenbsp;released,“)#pragmanbsp;messagenbsp;(“windowsnbsp;ntnbsp;5.0nbsp;betanbsp;1nbsp;andnbsp;windowsnbsp;98nbsp;betanbsp;2.1nbsp;werenbsp;thenbsp;currentnbsp;versions.“)#pragmanbsp;messagenbsp;(““)#pragmanbsp;messagenbsp;(“fornbsp;thisnbsp;releasenbsp;whennbsp;winvernbsp;isnbsp;definednbsp;asnbsp;0x0500nbsp;ornbsp;greater,nbsp;younbsp;cannbsp;only“)#pragmanbsp;messagenbsp;(“buildnbsp;betanbsp;ornbsp;testnbsp;applications.nbsp;nbsp;tonbsp;buildnbsp;anbsp;retailnbsp;application,“)#pragmanbsp;messagenbsp;(“setnbsp;winvernbsp;tonbsp;0x0400nbsp;ornbsp;visitnbsp;http://www.microsoft.com/msdn/sdk“)#pragmanbsp;messagenbsp;(“tonbsp;seenbsp;ifnbsp;retailnbsp;windowsnbsp;ntnbsp;5.0nbsp;ornbsp;windowsnbsp;98nbsp;headersnbsp;arenbsp;available.“)#pragmanbsp;messagenbsp;(““)#pragmanbsp;messagenbsp;(“seenbsp;thenbsp;sdknbsp;releasenbsp;notesnbsp;fornbsp;morenbsp;information.“)#pragmanbsp;messagenbsp;(““)#endif#ifndefnbsp;_inc_windows#definenbsp;_inc_windows#ifnbsp;definednbsp;(_msc_ver)nbsp;amp;amp;nbsp;(_msc_vernbsp;amp;gt;=nbsp;1020)#pragmanbsp;once#endif/*nbsp;nbsp;ifnbsp;defined,nbsp;thenbsp;followingnbsp;flagsnbsp;inhibitnbsp;definitionnbsp;*nbsp;nbsp;nbsp;nbsp;nbsp;ofnbsp;thenbsp;indicatednbsp;items.nbsp;*nbsp;*nbsp;nbsp;nogdicapmasksnbsp;nbsp;nbsp;nbsp;nbsp;-nbsp;cc_*,nbsp;lc_*,nbsp;pc_*,nbsp;cp_*,nbsp;tc_*,nbsp;rc_nbsp;*nbsp;nbsp;novirtualkeycodesnbsp;-nbsp;vk_*nbsp;*nbsp;nbsp;nowinmessagesnbsp;nbsp;nbsp;nbsp;nbsp;-nbsp;wm_*,nbsp;em_*,nbsp;lb_*,nbsp;cb_*nbsp;*nbsp;nbsp;nowinstylesnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;-nbsp;ws_*,nbsp;cs_*,nbsp;es_*,nbsp;lbs_*,nbsp;sbs_*,nbsp;cbs_*nbsp;*nbsp;nbsp;nosysmetricsnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;-nbsp;sm_*nbsp;*nbsp;nbsp;nomenusnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;-nbsp;mf_*nbsp;*nbsp;nbsp;noiconsnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;-nbsp;idi_*nbsp;*nbsp;nbsp;nokeysta