quote:
Originally posted by MSDN
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:code:
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.
So, a good way to do it would be:
code:
Interop.Call("user32.dll", "EnableWindow", Wnd.Handle, false);
where
Wnd is a valid ChatWnd object.
As for your closing problem, make sure you call it right:
code:
function OnWndEvent_CtrlClicked(Wnd, Id) {
if(Id == "BtnOk") {
Wnd.Close(0); //The number doesn't really matter, but it's more common to just set it to zero
}
}
Maybe it would be helpful if you post the code snippet where you call the Close function.