Bind SWindow OnWindowClosed

Hi, I would like to bind a function to the SWindow’s OnWindowClosed delegate.
This seams to be a different type of delegate/event system, which I don’t know how to use.

How would I declare my function to OnWindowClosed delegate that is of type FOnWindowClosed?
And how do I bind that same function to it?

Should I use the SWindow->SetOnWindowClosed function?

you can read it in this thread.