Some questions regarding windows handling

1. <ononluad> for a window – is this called on ActivateWindow() for another window? What if the window activated is a dialog?
2. How to close a custom dialog, returning back to calling window? Are there some default buttons for a custom dialog with default actions?
3. I am calling ActivateWindow() from a custom dialog. Should I somehow cleanup current custom/normal dialog before calling ActivateWindow()?