LCL: calculate QuestionDialog text area in the same way as PromptDialog (bug #7941)

git-svn-id: trunk@10319 -
This commit is contained in:
vincents 2006-12-09 20:18:53 +00:00
parent a18160e281
commit a7b3bda7c7

View File

@ -480,9 +480,9 @@ begin
If MessageTxt = '' then
MessageTxt := ' ';
TextBox := Rect(0,0, Screen.Width div 2,Screen.Height - 100);
Flags:=DT_CalcRect or DT_INTERNAL or DT_NoPrefix or DT_WordBreak;
DrawText(Canvas.GetUpdatedHandle([csHandleValid,csFontValid]),
PChar(MessageTxt),Length(MessageTxt),TextBox,Flags);
Flags:=DT_CalcRect or DT_INTERNAL or DT_WordBreak;
SelectObject(Canvas.Handle, GetStockObject(DEFAULT_GUI_FONT));
DrawText(Canvas.Handle, PChar(MessageTxt),Length(MessageTxt),TextBox,Flags);
// calculate the width we need to display the buttons
reqBtnWidth:=0;