• Advertisement

Archived

This topic is now archived and is closed to further replies.

Handles of open windows

This topic is 5379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

how can I retrive a list of open windows and their handles in visual c++? thx [edited by - Xtremehobo on May 1, 2003 9:54:06 PM]

Share this post


Link to post
Share on other sites
Advertisement
Win32API

EnumWindows

You specify your callback function, the first param is your handle.

Last time I did it was with Python, you can see that code if you wish. It should be similar minus the C/CPP details of course.


    
import win32gui

def EnumWindowProc(hwnd, lparam):
print hwnd

win32gui.EnumWindows(EnumWindowProc, None)


MSDN Link

[edited by - Interim on May 1, 2003 10:38:16 PM]

Share this post


Link to post
Share on other sites
hmm.. I have to do this without using message handling procedures in my program

Edit: oorr would that be the only way to do it :|
I'll try
Thanks

EDIT AGAIN: Ok got it working

[edited by - Xtremehobo on May 1, 2003 12:37:00 AM]

Share this post


Link to post
Share on other sites
Well, not quite message handling, just a callback function.

Ah you got it. =)

Int

Share this post


Link to post
Share on other sites

  • Advertisement