If you know an object type, and you have the object’s handle (hwnd), is there a way to turn that into a variable?
Example:
Set myObj = Magic(hwnd)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
HWNDs are just numbers that are mapped to internal objects by the OS (and they can and do get recycled). You can’t really turn them into anything.
What would you expect myObj to do in your example? All the Windows APIs for manipulating windowss take HWNDs.