Jump to content
  • Advertisement
Sign in to follow this  
jjj93421

Help Finding window handle

This topic is 5137 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!