Hi Nick,
I wanted to give this a go myself and came up with the following.
You have to first get the IWindowInfo object for the floating window. I did this by retrieving the list of all windows, then looping through until I found the first document window - see below. This assumes you already have the MapInfo object stored in global variable thisMIObject_g.
Dim nWinCounter As Integer
Dim nWinCount As Integer
Dim bContinue As Logical
Dim thisWindowList As This
Dim thisWindow As This
' Get the list of windows within MapInfo:
thisWindowList = GetWindows(thisMIObject_g)
' Set up the loop
nWinCounter = 0
nWinCount = GetWinListCount(thisWindowList)
bContinue = True
' Loop through all windows
Do While nWinCounter < nWinCount And bContinue
' Retrieve the current window
thisWindow = GetWinListItem(thisWindowList, nWinCounter)
If GetWinInfoIsDocumentWindow(thisWindow) Then
' This is a document window - get its ribbon
thisRibbon = MIProGetFltingWindowRibbon(thisMIObject_g, thisWindow)
bContinue = False
End If
nWinCounter = nWinCounter + 1
Loop?
Alternatively, if you know the WindowID of the floating window, you could call the WinListFromId function rather than looping through each window:
thisWindow = WinListFromId(thisWindowList, nWindowID)
You can then continue as you normally would with the usual ribbon - i.e. retrieve the tab collection for the ribbon:
thisRibbonTabColl = GetTabsColl(thisRibbon)
I hope this helps.
James.