im sorry therir was an error in my pose the function is as follows:
HWND FindWindowEx(
[...snip...]
Well, you still haven't posted your code which is having the problem.
However, making some assumptions (a bad thing, I know), you mention that
you want to fill an array by using this function in a loop. However,
nothing in the description of the function says that it iterates through
a list. Rather, it returns "a handle to _the_ window" (emphasis mine),
which tells me that it is explicitly stating that you will get the same
return value over and over. Calling it repeatedly will _not_ get you a
handle to the _next_ window.
I think this is a perfect example of why (1) showing actual code is very
important, (2) posting to the proper group is very important, and (3) not
giving erroneous information (like the wrong function name) is very
important.
Had you posted a question to a Windows programming group asking about
using FindWindowEx() in a loop, and included your code, someone there
probably would have pointed out right away that you're either using the
function incorrectly, or using the wrong function entirely.
If you want to find _all_ of the windows, then you need to use a
function which will enumerate (key word -- hint, hint) them for you.
Of course, now we're back to "which function that is, and how you use it
properly, are off-topic to clc and probably belong in one of the
comp.os.ms-windows.* or microsoft.public.* newsgroups". If, once you
get the function and how to use it, and you are using it properly (that
is, you are getting a list of values returned from successive calls) you
still have trouble filling in an array with its return values, then that
would be back on-topic here, but you need to post the code which is
failing, along with a description of the failure.
--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody |
www.hvcomputer.com | |
| kenbrody/at\spamcop.net |
www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:
[email protected]>