What I’m trying to do is to find out the text/row in an embedded view. A dialogue box contains an embedded view. User selects a row (clicks on a row) and then clicks on a button to do something with the selection.
This sounds next to impossible. Even provided we could use the windows API to find out the selected control (or whatever it is Notes client uses to display a row), at the moment we click on the other button we loose the focus and probably has no way to find out what was selected “right now”.
Still - maybe somebody has an idea how to approach this issue; maybe there are better ways to find out which doc is selected in the embedded view?
FYI there is a nice class by Julian Robichaux that need some slight modifs, but allows to find documents that have been selected in the embedded view by the check-marks in the selection margin. But as soon as we deal with a single document, checking it in the margin is not a nice requirement; besides we need to know exactly which replica is displayed in the embedded view pane. This still might be a fallback solution - Win API way sounds too tricky for me :-/
Subject: try using CaretNoteID
Hi,actually it’s not that difficult 
I’m using dialogbox with embedded folder and this folder has following code in onSelect event:
Sub Onselect(Source As Notesuiview)
Dim ws As New notesuiworkspace
Dim uidoc As NotesUIDocument
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set uidoc = ws.CurrentDocument
Set db = s.CurrentDatabase
Set doc = db.GetDocumentByID(source.CaretNoteID)
ans = doc.GetItemValue("projName")(0)
If Not(uidoc Is Nothing) Then
Call uidoc.FieldSetText ("selectedItem", ans+"|"+Cstr(doc.UniversalID ))
End If
End Sub
On dialog form I have field called “selectedItem”, which is filled after selecting an entry from view / folder. Same field is inserted to main form when dialog is processed.
hope that helps…
Subject: using win api to find text of the selected row in the view
Do you not get the correct information from the NotesDatabase.UnprocessedDocuments function?
Subject: RE: using win api to find text of the selected row in the view
Unprocessed IMO relates only to the agent’s selection. Also AFAIK there is no way to get the appropriate NotesUIView. Embedded views are quite tough to use…