Add hiding main dialog

Because of main dialog is can't be hidden by normal approach, override
message handler OnWindowPosChanging() and control flag.