hakanfa
asked on
EnumChildWindows does not work on Windows NT, any solutions..?
Hello!
I've been working on a project that gets data from a VB app. Everything works fin but not on Windows NT. I've been working hard to work around this with ex. GetWindow in some way but with no success. Any way to solve this??
Thanks,
Hokki
I've been working on a project that gets data from a VB app. Everything works fin but not on Windows NT. I've been working hard to work around this with ex. GetWindow in some way but with no success. Any way to solve this??
Thanks,
Hokki
According to the SDK, EnumChildWindows is supported on NT. Are you sure your code is correct?
If you use the function from a service you have to set "Allow service to interact With Desktop" for the service.
ASKER
Yes I am for shore. Been testing i alot of times.. Answer to the second comment: It is a standalone exe in question...
(the NT 4.0 has SP 6)
Hokki
(the NT 4.0 has SP 6)
Hokki
I have used EnumWindows with no problems on NT (not exactly the same but maybe you'll find this works as well).
call this method
EnumWindows(@EnumWindowsPr oc, 0);
implimentation of EnumWindowsProc
function EnumWindowsProc(hwnd: THandle; lParam: LPARAM): Boolean; stdcall;
var
pClassName: Array[0..255] of char;
begin
Result := True;
if Windows.GetClassName(hWnd, pClassName, SizeOf(pClassName)) = 0 then exit;
if StrComp(pClassName, 'Classname of the form I am looking for') <> 0 then exit;
// Do something with the handle.
end;
Hope this helps,
Rob
call this method
EnumWindows(@EnumWindowsPr
implimentation of EnumWindowsProc
function EnumWindowsProc(hwnd: THandle; lParam: LPARAM): Boolean; stdcall;
var
pClassName: Array[0..255] of char;
begin
Result := True;
if Windows.GetClassName(hWnd,
if StrComp(pClassName, 'Classname of the form I am looking for') <> 0 then exit;
// Do something with the handle.
end;
Hope this helps,
Rob
ASKER
Does this function enumerate childwindows too?
Will test it...just asking..
The problem is that some of the user is usin Win 200, all works fine, but the major part of the users are using NT 4.0 and the
EnuChildWindows is not working on their machines anyway.. I tried the GetWindw and it returnes the handles but not childwindow
handles..
Will test it...just asking..
The problem is that some of the user is usin Win 200, all works fine, but the major part of the users are using NT 4.0 and the
EnuChildWindows is not working on their machines anyway.. I tried the GetWindw and it returnes the handles but not childwindow
handles..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great! You're a genius! Works lika a charm!