How to get handle of control ?
-
Some Window Engine in this page is very good (use API function: WindowFromPoint()) . But I can't use it for my purpose: -Get handle of a "static " (label) created in Visual Basic 6.0. It seems VB label is drawn onto screen, not be a control (so you can't get its handle). Can you give me an answer ? Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Some Window Engine in this page is very good (use API function: WindowFromPoint()) . But I can't use it for my purpose: -Get handle of a "static " (label) created in Visual Basic 6.0. It seems VB label is drawn onto screen, not be a control (so you can't get its handle). Can you give me an answer ? Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
dlhson wrote: It seems VB label is drawn onto screen, not be a control I think the VB label is a STATIC control. I might be wrong here. But that's my impression. Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
-
Some Window Engine in this page is very good (use API function: WindowFromPoint()) . But I can't use it for my purpose: -Get handle of a "static " (label) created in Visual Basic 6.0. It seems VB label is drawn onto screen, not be a control (so you can't get its handle). Can you give me an answer ? Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
You are correct, the VB label is not a control. The form draws it. My guess this is to reduce the number of controls that VB programmers place on a form, since you are only allowed to have 255 declared in a resource file. What purposes do you want to have the handle to the label in VB? Depending on what you plan on doing, there are options.
Checkout my Guide to Win32 Paint for Intermediates
-
Some Window Engine in this page is very good (use API function: WindowFromPoint()) . But I can't use it for my purpose: -Get handle of a "static " (label) created in Visual Basic 6.0. It seems VB label is drawn onto screen, not be a control (so you can't get its handle). Can you give me an answer ? Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
control.hwnd Best Regards Carlos Antollini. Sonork ID 100.10529 cantollini
-
control.hwnd Best Regards Carlos Antollini. Sonork ID 100.10529 cantollini
I'm sorry I thinked that you was talking about VB... If you want to Know the HWND of the label, you must to use the label like a CWnd, and asign it with CWnd::GetDlgItem. You can get the handle with the data memeber CWnd::m_hWnd...;) Best Regards... Carlos Antollini. Sonork ID 100.10529 cantollini