网站首页  词典首页

请输入您要查询的函数:

 

术语 showwindow
释义 ShowWindow
语法:
BOOL ShowWindow( HWND hWnd,
int nCmdShow
);
ShowWindow函数
在ShowWindow函数设置指定窗口的显示状态。
参数
hWnd
[in]的窗口句柄。
nCmdShow
[in]指定窗口如何才能显现。忽略此参数,首次应用程序调用ShowWindow,如果该程序的启动应用程序提供了STARTUPINFO结构。否则,第一次调用ShowWindow的价值应该由WinMain函数获得其nCmdShow参数的值。在随后的调用,这个参数可以是下列值之一。
SW_FORCEMINIMIZE
视窗2000/XP的:减少一个窗口,即使拥有的线程窗口没有响应。此标志只应尽量减少时使用不同的线程窗口。
SW_HIDE
隐藏窗口并激活另一个窗口。
SW_MAXIMIZE
最大化指定的窗口。
SW_MINIMIZE
最小化指定的窗口和激活下一个顶部在Z顺序窗口。
SW_RESTORE
激活并显示窗口。如果窗口是最小化或最大化,该系统将其还原到原来的大小和位置。应用程序应指定此标志时,还原最小化窗口。
SW_SHOW
激活窗口,并显示在当前的大小和位置。
SW_SHOWDEFAULT
设置显示,国有关于STARTUPINFO结构中指定的SW_值的传递给CreateProcess函数的程序开始应用。
SW_SHOWMAXIMIZED
激活窗口,并显示为最大化窗口。
SW_SHOWMINIMIZED
激活窗口,并显示为最小化窗口。
SW_SHOWMINNOACTIVE
窗口中显示最小化窗口。此值类似于SW_SHOWMINIMIZED除了窗口,未激活。
SW_SHOWNA
在当前的大小和位置显示窗口。此值类似于SW_SHOW除了窗口,未激活。
SW_SHOWNOACTIVATE
显示在其最近的大小和位置窗口。此值类似于SW_SHOWNORMAL除了窗口,不激活。
SW_SHOWNORMAL
激活并显示一个窗口。如果窗口是最小化或最大化,该系统将其还原到原来的大小和位置。应用程序应指定此标志时,显示第一次窗口。
返回值
如果窗口以前可见,则返回值为非零。
如果窗口是以前隐藏的,返回值是零。
备注
执行某些特殊效果时,显示或隐藏一个窗口,使用AnimateWindow的。
第一次应用程序调用ShowWindow,它应该使用作为nCmdShow参数WinMain函数的nCmdShow参数。在ShowWindow的后续调用必须使用一个给定列表中的值,而不是由WinMain函数的nCmdShow参数指定的一个。
正如在nCmdShow参数的讨论,nCmdShow值在第一次调用ShowWindow如果启动的程序应用程序指定的结构启动信息被忽略。在这种情况下,ShowWindow使用在STARTUPINFO结构中指定的窗口显示的信息。在后续调用,应用程序必须调用设置为SW_SHOWDEFAULT使用启动信息的程序,推出了应用程序提供nCmdShow ShowWindow。此行为是设计用于下列情况:
应用程序通过调用与WS_VISIBLE标志集CreateWindow他们的主要窗口。
应用程序通过调用与WS_VISIBLE标志CreateWindow的主要窗口清除,后来称之为与SW_SHOW标志ShowWindow设置使其可见。
例如
有关示例,请参阅创建一个主要窗口。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
视窗概述,CreateProcess的,CreateWindow,ShowOwnedPopups,AnimateWindow的,STARTUPINFO,WinMain
==英文原文==ShowWindow Function
The ShowWindow function sets the specified window's show state.
Syntax
BOOL ShowWindow( HWND hWnd,
int nCmdShow
);
Parameters
hWnd
[in] Handle to the window.
nCmdShow
[in] Specifies how the window is to be shown. This parameter is ignored the first time an application calls ShowWindow, if the program that launched the application provides a STARTUPINFO structure. Otherwise, the first time ShowWindow is called, the value should be the value obtained by the WinMain function in its nCmdShow parameter. In subsequent calls, this parameter can be one of the following values.
SW_FORCEMINIMIZE
Windows 2000/XP: Minimizes a window, even if the thread that owns the window is not responding. This flag should only be used when minimizing windows from a different thread.
SW_HIDE
Hides the window and activates another window.
SW_MAXIMIZE
Maximizes the specified window.
SW_MINIMIZE
Minimizes the specified window and activates the next top-level window in the Z order.
SW_RESTORE
Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized window.
SW_SHOW
Activates the window and displays it in its current size and position.
SW_SHOWDEFAULT
Sets the show state based on the SW_ value specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application.
SW_SHOWMAXIMIZED
Activates the window and displays it as a maximized window.
SW_SHOWMINIMIZED
Activates the window and displays it as a minimized window.
SW_SHOWMINNOACTIVE
Displays the window as a minimized window. This value is similar to SW_SHOWMINIMIZED, except the window is not activated.
SW_SHOWNA
Displays the window in its current size and position. This value is similar to SW_SHOW, except the window is not activated.
SW_SHOWNOACTIVATE
Displays a window in its most recent size and position. This value is similar to SW_SHOWNORMAL, except the window is not actived.
SW_SHOWNORMAL
Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time.
Return Value
If the window was previously visible, the return value is nonzero.
If the window was previously hidden, the return value is zero.
Remarks
To perform certain special effects when showing or hiding a window, use AnimateWindow .
The first time an application calls ShowWindow, it should use the WinMain function's nCmdShow parameter as its nCmdShow parameter. Subsequent calls to ShowWindow must use one of the values in the given list, instead of the one specified by the WinMain function's nCmdShow parameter.
As noted in the discussion of the nCmdShow parameter, the nCmdShow value is ignored in the first call to ShowWindow if the program that launched the application specifies startup information in the structure. In this case, ShowWindow uses the information specified in the STARTUPINFO structure to show the window. On subsequent calls, the application must call ShowWindow with nCmdShow set to SW_SHOWDEFAULT to use the startup information provided by the program that launched the application. This behavior is designed for the following situations:
Applications create their main window by calling CreateWindow with the WS_VISIBLE flag set.
Applications create their main window by calling CreateWindow with the WS_VISIBLE flag cleared, and later call ShowWindow with the SW_SHOW flag set to make it visible.
Example
For an example, see Creating a Main Window .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as Unicode version.
See Also
Windows Overview , CreateProcess , CreateWindow , ShowOwnedPopups , AnimateWindow , STARTUPINFO , WinMain
==原始网址==http://msdn.microsoft.com/en-us/library/ms633548(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:24:44