I am creating an application that is supplimenting the data provided on our third part application. They don't have an open API so I have been force to using WM_GETTEXT to get the information that we are looking at. This works fine for the the window titles but some of the windows I need to find a unique identifier on the screen. If I click or tab through the box I need I get the text. If I don't however it only returns blank.
It's pretty simple code and if I have to I can write a wrapper in c++ though I'd prefer not to at the moment (I figure I'll have to for performance reasons later but right now I'm just trying to identify all the information I need for the full application later on)
StringBuilder sb = new StringBuilder(1024);
length = SendMessage(hWnd, WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero);
int successText = (int)SendMessage(hWnd, WM_GETTEXT, (IntPtr)sb.Capacity, sb);
I have tried just sending a bunch of tab key presses but even using the keybd_event it takes about a full second to iterate through all 44 fields back to the starting field which isn't really acceptable.
If it is any help the original application is a late 90's powerbuilder app.