Canvas.Font.Size := Font.Size;
if FPopupType = gptRaw then begin
Canvas.Font.Style := [];
- DrawText(Canvas.Handle, PChar(Caption), -1, R, DT_LEFT or DT_NOPREFIX);
+ DrawText(Canvas.Handle, PChar(Caption), -1, R, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
end else begin
if FTitle <> '' then begin
Canvas.Font.Style := [fsBold];
H := DrawText(Canvas.Handle, PChar(FTitle), -1, R,
- DT_LEFT or DT_NOPREFIX);
+ DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
if FResList.Count > 0 then
R.Top := R.Top + H + TITLE_SPACE
else
if FHeaderBold then
Canvas.Font.Style := [fsBold];
H := DrawText(Canvas.Handle, PChar(ResData.FHeader), -1, R,
- DT_LEFT or DT_NOPREFIX);
+ DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
R.Top := R.Top + H;
//\83X\83y\81[\83X
R.Top := R.Top + HEADER_SPACE;
Canvas.Font.Style := [];
R.Left := R.Left + BODY_INDENT;
H := DrawText(Canvas.Handle, PChar(ResData.FBody), -1, R,
- DT_LEFT or DT_NOPREFIX);
+ DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
R.Top := R.Top + H;
R.Left := R.Left - BODY_INDENT;
end;
Canvas.Font.Style := [fsBold];
Result := Rect(0, 0, MaxWidth, 0);
DrawText(Canvas.Handle, PChar(AHint), -1, Result,
- DT_CALCRECT or DT_LEFT or DT_NOPREFIX);
+ DT_CALCRECT or DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
end else begin
//Title
if FTitle <> '' then begin
Canvas.Font.Style := [fsBold];
ARect := Rect(0, 0, MaxWidth, 0);
DrawText(Canvas.Handle, PChar(FTitle), -1, ARect,
- DT_CALCRECT or DT_LEFT or DT_NOPREFIX);
+ DT_CALCRECT or DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
if Result.Right < ARect.Right then
Result.Right := ARect.Right;
if FResList.Count > 0 then
Canvas.Font.Style := [fsBold];
ARect := Rect(0, 0, MaxWidth, 0);
DrawText(Canvas.Handle, PChar(ResData.FHeader), -1, ARect,
- DT_CALCRECT or DT_LEFT or DT_NOPREFIX);
+ DT_CALCRECT or DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
if Result.Right < ARect.Right then
Result.Right := ARect.Right;
Result.Bottom := Result.Bottom + ARect.Bottom;
Canvas.Font.Style := [];
ARect := Rect(0, 0, MaxWidth, 0);
DrawText(Canvas.Handle, PChar(ResData.FBody), -1, ARect,
- DT_CALCRECT or DT_LEFT or DT_NOPREFIX);
+ DT_CALCRECT or DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
if Result.Right < (ARect.Right + BODY_INDENT) then
Result.Right := ARect.Right + BODY_INDENT;
Result.Bottom := Result.Bottom + ARect.Bottom;
procedure TResPopup.ClearAllRes;
var
i: Integer;
+ ResData: PResDataRec;
begin
- for i := 0 to FResList.Count - 1 do
- Dispose(FResList[i]);
+ for i := 0 to FResList.Count - 1 do begin
+ ResData := FResList[i];
+ Dispose(ResData);
+ end;
FResList.Clear;
FTitle := '';
Caption := '';