Jump to content
Sign in to follow this  
Zohar

[Solved] How Can I Get the ClassNN of a Control, from its Handle?

Recommended Posts

Zohar

Hi

 

Assume you have a Handle to a control, for example via using ControlGetFocus("").

You now have a Handle, and you want to get the ClassNN of that control..

What should be used?

 

Thank you

Zohar

Edited by Zohar

Share this post


Link to post
Share on other sites
JLogan3o13

Something like this perhaps?

#include <WinAPI.au3>

$hwnd = WinGetHandle("Untitled", "") ;Notepad
MsgBox(0, "", _WinAPI_GetClassName($hwnd))

Edit: Sorry, I misread - you were looking for class name of the control, not the window.











Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Zohar

Wrong.

ControlGetFocus returns the classname.

 

You're right!

Sorry, my mistake :)

Share this post


Link to post
Share on other sites

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  

×