I'd like to get the current (possibly uncommitted) text out of the formula bar in Excel (from an addin in-process). All "usual" techniques don't work, like GetWindowText(...), etc.
As for cursor position: GetCaretPos actually works (returns the x,y coords of the caret), but EM_CHARFROMPOS doesn't (always returns 0) so that's a dead end.
Is this functionality exposed through COM or to the XLL API in any way?
EDIT: I'd also like to point out that I think the majority of my issues come from the fact that the formula bar is (at least I'm 99% sure) NOT an edit control, which can be seen by looking at its window class.
The formula bar, and indeed most of the controls in Office are non-standard. Sending standard messages will not yield success.
I imagine the only option will be to reverse-engineer the executable code.