Ver Fonte

Support MB_ABORTRETRYIGNORE.

Martijn Laan há 6 anos atrás
pai
commit
481d773661
2 ficheiros alterados com 11 adições e 2 exclusões
  1. 3 2
      ISHelp/isxfunc.xml
  2. 8 0
      Projects/TaskDialog.pas

+ 3 - 2
ISHelp/isxfunc.xml

@@ -2402,9 +2402,10 @@ end;</pre></example>
         <remarks><p>TMsgBoxType is defined as:</p>
         <remarks><p>TMsgBoxType is defined as:</p>
 <p><tt>TMsgBoxType = (mbInformation, mbConfirmation, mbError, mbCriticalError);</tt></p>
 <p><tt>TMsgBoxType = (mbInformation, mbConfirmation, mbError, mbCriticalError);</tt></p>
 <p>Supported flags for <tt>Buttons</tt> are:</p>
 <p>Supported flags for <tt>Buttons</tt> are:</p>
-<p><tt>MB_OK, MB_OKCANCEL, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL</tt></p>
+<p><tt>MB_OK, MB_OKCANCEL, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL, MB_ABORTRETRYIGNORE</tt></p>
+<p>If <tt>MB_ABORTRETRYIGNORE</tt> is used, <tt>ButtonLabels</tt> may not be an empty array and the button labels must be specified in the following special order: Retry, Ignore, Abort.</p>
 <p>Supported values for <tt>ShieldButton</tt> and possible return values are:</p>
 <p>Supported values for <tt>ShieldButton</tt> and possible return values are:</p>
-<p><tt>IDOK, IDCANCEL, IDRETRY, IDYES, IDNO</tt></p></remarks>
+<p><tt>IDOK, IDCANCEL, IDRETRY, IDYES, IDNO, IDABORT, IDIGNORE</tt></p></remarks>
         <example><pre>begin
         <example><pre>begin
   case TaskDialogMsgBox('Choose A or B',
   case TaskDialogMsgBox('Choose A or B',
                         'You can choose A or B.', 'You can choose A or B'#13#10#13#10'Do you choose A?',   
                         'You can choose A or B.', 'You can choose A or B'#13#10#13#10'Do you choose A?',   

+ 8 - 0
Projects/TaskDialog.pas

@@ -154,6 +154,14 @@ begin
         end;
         end;
         TDCommonButtons := TDCommonButtons or TDCBF_CANCEL_BUTTON;
         TDCommonButtons := TDCommonButtons or TDCBF_CANCEL_BUTTON;
       end;
       end;
+    MB_ABORTRETRYIGNORE:
+      begin
+        if NButtonLabelsAvailable = 0 then
+          InternalError('TaskDialogMsgBox: Invalid ButtonLabels')
+        else
+          ButtonIDs := [IDRETRY, IDIGNORE, IDABORT]; { Notice the order, abort label must be last }
+        TDCommonButtons := 0;
+      end;
     else
     else
       begin
       begin
         InternalError('TaskDialogMsgBox: Invalid Buttons');
         InternalError('TaskDialogMsgBox: Invalid Buttons');