|
-
April 13th, 1999, 10:19 PM
#1
how can I make my modal dialog box go away
I created a modal dialog box which pops up when I click the SDI child area with the left mouse button. The dialog box has 2 options, forward and backward, both of which lead to different modal dialog boxes.
When I click forward or backward button though, my original control dialog box which had the 2 push button options won't go away. This really drives me nuts! I have appended my code below. Is there anything I can do to remove this 'control' dialog box after I selected a push button?
Any response any one can give me will be greatly appreciated.
void CBloodAlcoholView::OnLButtonDown(UINT nFlags, CPoint point)
{
CControl controlDlg;
controlDlg.DoModal();
}
void CBloodAlcoholView::OnCalculateBackward()
{
CClientDC cDC(this);
cDC.TextOut(10,10,"calculate forward");
CBackward backwardDlg;
backwardDlg.DoModal();
}
void CBloodAlcoholView::OnCalculateForward()
{
CClientDC cDC(this);
cDC.TextOut(10,10,"calculate forward");
CForward forwardDlg;
forwardDlg.DoModal();
}
-
April 14th, 1999, 01:39 AM
#2
Re: how can I make my modal dialog box go away
do you need call SendMessage(WM_CLOSE, 0, 0) in OnMyButtonPressed() dialog memeber functions (use class wizard to create them)?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|