| |

VerySource

 Forgot password?
 Register
Search
View: 1175|Reply: 4

Why does the exit button always give an error?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-9 20:40:01
| Show all posts |Read mode
I wrote a small program for phone billing with MFC. There is only one dialog box. The program compiles and links are fine. The runtime is normal, and the content in the Access database is correct, but it always reports an error when exiting:
              Debug Assertion Failed!
        Programme: ..... (path name)
        File: afx.inl
        Line: 122
Here is the code for the exit button:
void CFeeCountingDlg :: OnButton1out ()
{
// Judge the button status
         if (Begin_Button_State! = FALSE&&Finish_Button_State == FALSE)
{
KillTimer (0); // end the clock
CDialog :: OnCancel (); // Quit (it is an error when debugging this sentence)
}
else
MessageBox ("Calling ...");
// TODO: Add your control notification handler code here
Ranch
}
Reply

Use magic Report

0

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-13 17:45:01
| Show all posts
Change the total exit method, if it is modal, use EndDialog
Reply

Use magic Report

0

Threads

57

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-1-14 14:18:02
| Show all posts
What is the specific assertion of the error, make it clear
Reply

Use magic Report

0

Threads

59

Posts

43.00

Credits

Newbie

Rank: 1

Credits
43.00

 China

Post time: 2020-1-14 19:36:02
| Show all posts
Comment out CDialog :: OnTimer in OnTimer
Reply

Use magic Report

0

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 Invalid IP Address

Post time: 2020-3-12 20:15:02
| Show all posts
Unable to answer, more detailed points from the landlord!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list