程序确认退出


/ Published in: C++
Save to your folder(s)



Copy this code and paste it in your HTML
  1. switch (Application->MessageBox(" 真的要退出吗? ", Application->Title.c_str(), MB_OKCANCEL + MB_ICONQUESTION + MB_TOPMOST))
  2. {
  3. case IDOK:
  4. {
  5. Action = caFree;
  6. break;
  7. }
  8. case IDCANCEL:
  9. {
  10. Action = caNone;
  11. break;
  12. }
  13. }
  14.  
  15.  
  16.  
  17. dlgInfo->ButtonCount = 2;
  18. dlgInfo->Caption = "注意";
  19. dlgInfo->IconType = suiWarning;
  20. dlgInfo->Text = "要退出吗?";
  21. if (dlgInfo->ShowModal() == mrOk)
  22. {
  23. Action = caFree;
  24. }
  25. else
  26. {
  27. Action = caNone;
  28. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.