Mohammad Abdelaziz
Mohammad Abdelaziz

Reputation: 123

How to get the Window Class Name and Id from HWND?

How to get the Window Class Name and Id from HWND?

I searched but found the opposite is more popular.

Any thoughts?!?!?

Upvotes: 8

Views: 30836

Answers (3)

Sertac Akyuz
Sertac Akyuz

Reputation: 54772

Answers by Andreas and Arthur show how to get the class name. With 'Id' perhaps you mean the window identifier for child windows;

GetWindowLong(HWnd, GWL_ID)

Upvotes: 8

Andreas Rejbrand
Andreas Rejbrand

Reputation: 108929

GetClassName is exactly what you're looking for.

Upvotes: 4

Arthur
Arthur

Reputation: 8129

GetClassName: http://msdn.microsoft.com/en-us/library/ms633582(v=VS.85).aspx

What do you mean with Id?

Upvotes: 6

Related Questions