GetWindowText(hwnd) from NotesRichText window

Anyone know of a way to get the text conatined in the NotesRichText window class (mail body field) via the win32 api?

When I have the HWND for the NotesRichText window and try a GetWindowText on it, I am always returned an empty string.

Subject: RE: GetWindowText(hwnd) from NotesRichText window

Manipulating the Notes program windows directly with Windows operating system calls is generally not advisable. May I ask what you’re trying to accomplish? I’m sure there’s a better way to do it.

Subject: RE: GetWindowText(hwnd) from NotesRichText window

I don’t actually need to manipulate anything, I just need to get the text that is in the rich text field.

To be specific, on a windows key type I want to be able to get the text in the rich text area, but GetWindowText isn’t working for me.

Subject: RE: GetWindowText(hwnd) from NotesRichText window

That really wasn’t a description of what you’re trying to accomplish.

Why would you not use OLE automation for this (assuming it’s initiated from outside of Notes)? NotesUIWorkspace.CurrentDocument.Document.GetFirstItem(“fieldname”).GetFormattedText(…)

Subject: RE: GetWindowText(hwnd) from NotesRichText window

Thanks, I’m actually running in the notes proc as an ext manager. What I am trying to do is create a spell checker for notesrichtext fields.

Is there anyway to get around the Dispatch interface and get ahold of the CurrentDocument and fields natively?

Subject: RE: GetWindowText(hwnd) from NotesRichText window

Why wouldn’t you access the rich text field directly from the note handle? Which extension manager hooks are you using?