Sign in to follow this  

Help Finding window handle

This topic is 4859 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

Hi. I know it seems easy but I need to get the handle of any window that is currently on the desktop when my program is run. I could use enumwindow() I guess but I'm new to programming and I need help with this function. Oh, I'm using C++ win32 and its a console program. The window that I'm wanting to move wasn't created by me. The title of this window changes all the time so I need something besides just FindWindow. I'm using Findwindow right now and it is annoying to keep using Spy++ and then compile my program everytime. I got the classname using the GetClassName function and so I tried it with Findwindow but it didn't work for some reason. It was like this: HWND hwnd; hwnd=FindWindow("#32770",NULL); but it didn't work. ??? Is it the NULL that is the problem? That is definitely the correct class name ?

Share this post


Link to post
Share on other sites

This topic is 4859 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this