On-screen text in text area
BlitzPlus Forums/BlitzPlus Programming/On-screen text in text area| 
 | ||
| Anyone got a good way to work out which section of the text in a text area gadget is actually visible in the text area? The text area can be resized to any size. | 
| 
 | ||
| Rottbott, here's something that will help you: [a http://support.microsoft.com/default.aspx?scid=kb;en-us;88387]Microsoft Knowledge Base Article - 88387 HOWTO: Determine the Visible Area of a Multiline Edit Control[/a] | 
| 
 | ||
| Interesting. Obviously what I really need to find is the first visible line in my text area, after which everything else is easy. I think it depends on just what TextAreaCursor() returns. I'll investigate. | 
| 
 | ||
| First visible line in textarea: ; .lib "user32.dll" ; SendMessage%(hwnd, msg, wParam, mParam):"SendMessageA" Const EM_GETFIRSTVISIBLELINE = $00CE Notify SendMessage(QueryObject(textarea,1), EM_GETFIRSTVISIBLELINE, 0, 0) ; note that it includes lines that are only partly visible | 
| 
 | ||
| Thanks, perfect. I'm useless at all this Win32 stuff! |