Link to home
Start Free TrialLog in
Avatar of EWestWood
EWestWood

asked on

How to get ALL Window Handle match Class Name ?

Hi,
I have a question that i wanna get handles of ALL Windows match ClassName that i gave.
For example: Find all Window Handles have ClassName "ABC".
I tried to use FindWindow or FindWindowEx with lpszClass = "ABC" but in this case it only return Window handle of first Window have ClassName ="ABC". I don't know how to search for next Window.

Thank you
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EWestWood
EWestWood

ASKER

Very nice code. Thank you so lots.
I accepted your solution. Beside that after read your code i think i can expand it with allow to search for window name too.

PS: With you declare SendMessageA, i think should change to W that support Unicode :). I'll reply my modified code from your after finish.

Thank you again.
Should use W for support Unicode with SendMessage :)
Aha.. never mind. Your code already perfect.. Just replace "SendMessageA" to "SendMessageW". I think so. That's all.