To restore windows state from minimized to previous state, use the following

SendMessage(docView.Handle, WM_SYSCOMMAND, SC_RESTORE, 0);