|
BOOL CMainFrame::Login()
{
this->ShowWindow(SW_MINIMIZE);
CLoginForm loginForm();
if (loginForm.DoModal() != IDOK)
{
this->PostMessage(WM_CLOSE);
return FALSE;
}
...
this->ShowWindow(SW_SHOWNORMAL);
return TRUE;
}
void CLoginForm::OnClickedMinimize()
{
ShowWindow(SW_MINIMIZE);
}
The MainFrame is showing and the user click the logout button to call login function. The the CLoginForm show, CLoginForm is a no border CDialog, when user click the minimize button of CLoginForm. The CLoginForm is hide, but there is a black block in the left-bottom of the screem. I donot know why this happen.
|
|
|
|
|
My guess is that login being a modal dialog will prevent the parent window from processing things (like paint messages) until the modal dialog is dismissed. Might you use a modeless dialog in this case?
|
|
|
|
|
Why, oh, Why do you want to minimize the main frame window when the Modal login dialog is displayed ?
Don't make it hard on you, just keep the main frame as is.
Nihil obstat
|
|
|
|