__Window.FindWindow
Error This function returns 0
__Window.FindWindow
Hi
There is no way to check or update those modules , By looking at the source code i could not see any problems.
For the functions with string arguments , you should use nil where NULL expected because "" is a valid string anyway.
By the MS documentation one of arguments must contain a valid string and the other one must be NULL.
For the FindWindow and any other function ,you can use __DLL class as well
Please next time post a sample project to illustrate the issue , i really do not have time to re-produce the bugs you have posted by creating projects to check .
There is no way to check or update those modules , By looking at the source code i could not see any problems.
For the functions with string arguments , you should use nil where NULL expected because "" is a valid string anyway.
By the MS documentation one of arguments must contain a valid string and the other one must be NULL.
Code: Select all
local hwnd = __Window.FindWindow("progman",nil);
Dialog.Message("Notice", "Handle Of Desktop Window : "..tostring(hwnd), MB_OK);
For the FindWindow and any other function ,you can use __DLL class as well
Code: Select all
g_User32 = __DLL.LoadLibrary("User32.dll","stdcall");
if(g_User32) then
f_FindWindow = __DLL.GetFunction(g_User32,_long,"FindWindowA",_string,_string);
if(f_FindWindow) then
local hwnd = f_FindWindow(nil,"My Project");
Dialog.Message("Notice", "Handle Of App Window : "..tostring(hwnd), MB_OK);
end
end
OK friend thanks for your time.