Add main application frame.
Fix doc_open on Windows.