hey, how can i retrive a letter from a controll under the cursor??
-
hey, I'm havening trouble trying to get the letter under the mouse my purpose is to make each letter in a label select able or a button. can any one help, i would be great if you do ;) Thanks
There's a Win32 API called WindowFromPoint, this will give you the window handle of the control you are over. From there, you can use GetWindowText, but working out what letter is under the mouse, will be a little more complex, you need to get the font details from the control, and work out how that font renders. A multi line control makes it even harder. I imagine getting it to work 100% of the time would be a very big job, indeed.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
There's a Win32 API called WindowFromPoint, this will give you the window handle of the control you are over. From there, you can use GetWindowText, but working out what letter is under the mouse, will be a little more complex, you need to get the font details from the control, and work out how that font renders. A multi line control makes it even harder. I imagine getting it to work 100% of the time would be a very big job, indeed.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog