网站首页  词典首页

请输入您要查询的函数:

 

术语 enablewindow
释义 EnableWindow
语法:
BOOL EnableWindow( HWND hWnd,
BOOL bEnable
);
EnableWindow函数
该EnableWindow功能启用或禁用鼠标和键盘输入到指定的窗口或控制。当输入被禁用,窗口不接受如鼠标点击和按键输入。当输入启用,窗口接收所有输入。
参数
hWnd
[in]的窗口句柄要启用或禁用。
bEnable
[in]指定是否启用或禁用的窗口。如果此参数为TRUE,窗口启用。如果该参数为FALSE,窗口被禁用。
返回值
如果窗口以前禁用,返回非零值。
如果窗口以前未禁用,返回值是零。
备注
如果窗口被禁用,系统发送WM_CANCELMODE消息。如果一个窗口的启用状态正在改变,该系统发送的信息后,WM_CANCELMODE 1 WM_ENABLE消息。 (这些消息被发送前EnableWindow的回报。)如果窗口已被禁用,它的子窗口是含蓄残疾人,虽然他们没有派出一名WM_ENABLE消息。
一个窗口,必须启用才能被激活。例如,如果应用程序显示一个模式对话框,并禁用它的主窗口,应用程序必须启用之前销毁对话框中的主窗口。否则,另一个窗口将获得键盘焦点和被激活。如果一个子窗口已关闭,它被忽略,当系统尝试确定哪个窗口应得到鼠标消息。
默认情况下,启用一个窗口创建时。要创建一个窗口,最初是禁用,应用程序可以在指定的CreateWindow或CreateWindowEx函数WS_DISABLED风格。经过一个窗口被创建,应用程序可以使用EnableWindow启用或禁用的窗口。
应用程序可以使用此功能来启用或禁用一个对话框中的控件。被禁用的控件不能接收键盘焦点,用户也不能获得它。
Windows 95/98/Me的:虽然EnableWindow在Windows 95/98/Me存在,它是对Unicode的支持,提供更一致的窗口行为在所有Windows操作系统的微软公司层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
参见
键盘输入,CreateWindow,CreateWindowEx,IsWindowEnabled,WM_ENABLE
==英文原文==EnableWindow Function
The EnableWindow function enables or disables mouse and keyboard input to the specified window or control. When input is disabled, the window does not receive input such as mouse clicks and key presses. When input is enabled, the window receives all input.
Syntax
BOOL EnableWindow( HWND hWnd,
BOOL bEnable
);
Parameters
hWnd
[in] Handle to the window to be enabled or disabled.
bEnable
[in] Specifies whether to enable or disable the window. If this parameter is TRUE, the window is enabled. If the parameter is FALSE, the window is disabled.
Return Value
If the window was previously disabled, the return value is nonzero.
If the window was not previously disabled, the return value is zero.
Remarks
If the window is being disabled, the system sends a WM_CANCELMODE message. If the enabled state of a window is changing, the system sends a WM_ENABLE message after the WM_CANCELMODE message. (These messages are sent before EnableWindow returns.) If a window is already disabled, its child windows are implicitly disabled, although they are not sent a WM_ENABLE message.
A window must be enabled before it can be activated. For example, if an application is displaying a modeless dialog box and has disabled its main window, the application must enable the main window before destroying the dialog box. Otherwise, another window will receive the keyboard focus and be activated. If a child window is disabled, it is ignored when the system tries to determine which window should receive mouse messages.
By default, a window is enabled when it is created. To create a window that is initially disabled, an application can specify the WS_DISABLED style in the CreateWindow or CreateWindowEx function. After a window has been created, an application can use EnableWindow to enable or disable the window.
An application can use this function to enable or disable a control in a dialog box. A disabled control cannot receive the keyboard focus, nor can a user gain access to it.
Windows 95/98/Me: Although EnableWindow exists on Windows 95/98/Me, it is supported by the Microsoft Layer for Unicode to provide more consistent windowing behavior across all Windows operating systems. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
See Also
Keyboard Input , CreateWindow , CreateWindowEx , IsWindowEnabled , WM_ENABLE
==原始网址==http://msdn.microsoft.com/en-us/library/ms646291(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:31:35