Version: Delphi Berlin 10.1
I am encountering problems, in what I consider to be a vcl theme bug, that when applying a vcl style theme to the application, messages using TApplication.MessageBox are limited to 256 characters.
TApplication.MessageBox with 298 characters of text WITHOUT the VCL theme applied. All text is displayed correctly. Link: without VCL Style Theme
TApplication.MessageBox with 298 characters text WITH the VCL theme applied. The text is limited to 256 characters and the rest is cut. Link: with any VCL Style Theme (Windows10 example)
I have already analyzed the TCustomStyle class of Vcl.Styles.pas but I have not found how to solve this unpleasant situation, so I would like your help.
EDIT:
Following the information that Andreas Rejbrand passed, it was possible to identify that it was a limitation in the buffer size of the GetText of TStyleHook that was limited to the array of [0..256] of char. With this information I created a detour for a new method where I increased the buffer size to array of [0..1023] of char which solved my problem.
Bug reported in QC Embarcadero:
https://quality.embarcadero.com/browse/RSP-14771
and
https://quality.embarcadero.com/browse/RSP-14772
Note: Unfortunately updating the IDE (which would solve the problem) to a newer version is not possible at this time.