Unfortunately I didn't found an easy way to work with
array of const. I wrote a utility class for that according to
this. It encapsulates
array of TVarRec and have Append/Prepend functionality.
As
TVarRec needs some additional housekeeping for copying, it needs Create/Free pair, but now with advanced records t can be overhauled.
Currently it may be used like this:
CA := TConstArrayAccess.Create([]);
case AFlags and $0F of
MB_OK:
begin
CA.Append([mrOk, msgButtonOk]);
Res:= QuestionDlg(msgTitle, AText, Typ, CA.AsConstArray, 0);
end;
MB_OKCANCEL:
...
end;
CA.Free;
If that seems OK with you I can extract that class in a separate unit (because it is in a bulk with a lot more unrelated stuff) and I can share it.