OSDN Git Service

1.59.1.778
[gikonavigoeson/gikonavi.git] / HintWindow.pas
index 57483af..743e61c 100644 (file)
@@ -74,12 +74,12 @@ begin
        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
@@ -94,7 +94,7 @@ begin
                        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;
@@ -102,7 +102,7 @@ begin
                        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;
@@ -122,14 +122,14 @@ begin
                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
@@ -147,7 +147,7 @@ begin
                                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;
@@ -157,7 +157,7 @@ begin
                        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;
@@ -182,9 +182,12 @@ end;
 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 := '';