im having trouble with the EnumWindows API; the fact that i know hardly anything about API doesnt help...what i am trying to do is get a list of the handles of the windows on the screen...the EnumWindows function is the best thing i could find (atleast it seems like it's what i'm lookin for to me)...i set it up the way it is in the API Text Viewer:
[code]Private Declare Function EnumWindows Lib "user32" _
(ByVal lpEnumFunc As Long, _
ByVal lParam As Long) As Long[/code]
from looking at the help in the msdn library it seems like lpEnumFunc is supposed to be some kind of function ([b]EnumWindowsProc[/b]) that is user defined and returns [italic]True[/italic] to tell EnumWindows to continue going and [italic]False[/italic] to tell it to stop (im not sure why API TextViewer didnt set it as a Boolean instead of a Long, but as far as working goes i dont think that matters)...lParam seems like its supposed to be some kind of Index of some sort...im not real sure...
whenever i use a [italic]True[/italic] value value for lpEnumFunc (i tried making a function and letting the function return the value) visual basic has an illegal operation...
[red]**NOTE: i did NOT try to assign a Boolean to a Long...i used a function that returned a Long and then did [italic]function[/italic] = True[/red]
like i said im new to API, so i'm probably getting it all wrong, plus the help for API being in C++ doesnt help much either...im not good with C++ so it takes me a while to try to convert what it says into vb...if anyone can help at all on this it would be much appreciated (inlcuding if you know another way to find the handle of all the windows on the screen)...thanks