Anders S. Johansen wrote: > OK. I have a way to get the currently forground window, so that will work > nicely. I then need a way to check, say: > > bool isOOoWindow(const HWND w);
Yes, as I wrote: this can be implemented in the following way: get all frames from the Desktop service of OOo, retrieve their ContainerWindow and check their window handle. Details can be explained when the other problems are solved. >> We have an API for cursor travelling, but I don't understand how a >> single integer value can describe a cursor position. Can you explain? >> What is the "reference point" for your position? > > OK. > > ^ is cursor > > ^hello <-- pos == 0 > > h^ello <-- pos == 1 Yes, sure, but this doesn't help. Consider a complex document with 100 pages of text. Your current view might be on page 17. On this page you have a text table on the tab, followed by normal text, the text cursor is in the last paragraph of it. So which character should be the one with position 0? The first character of the document? The first character in the table? The character that the cursor points to? Another example: there is a text frame surrounded by normal text. The text frame lies in the middle of the paragraph, below line 1 and above line 7, some text on its left and right side. How will you describe this with a linear cursor position? Please consider that the text inside the frame can have a different number of lines that does not match the lines outside of it. Here's a picture of what I described: xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxx ----------------- xxxx xxxx | | xxxx xxxx | | xxxx xxxx | | xxxx xxxx ----------------- xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx I'm sure I could find more "interesting" arrangements like this one. :-) >>> void ChangeRange(const HWND w, char *NewString, const int >>> start, const int length); I forgot to mention: if you want to use char* to address strings there is another problem because OOo strings are 16Bit UniCode strings, so a suitable data type should be used. You could workaround this by converting all strings received by our API to UTF-8 encoded strings in the DLL with C-API but then you can't rely on the usual pointer arithmetics. >> BTW: I thought that the best list would be [email protected] but >> [email protected] should be OK here also. One move is enough. :-) > > OK, I have tried a few times, but it has not shown up in the archives. Not I > experiment with a new method (joining, then mailing to thwe list). I didn't want to suggest a move to api-dev, but now you arrived here, so let's go on. :-) Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
