diff --git a/collects/mred/private/wx/win32/message.rkt b/collects/mred/private/wx/win32/message.rkt index 3403c676..31729bac 100644 --- a/collects/mred/private/wx/win32/message.rkt +++ b/collects/mred/private/wx/win32/message.rkt @@ -19,6 +19,7 @@ (define STM_SETIMAGE #x0172) (define SS_LEFT #x00000000) +(define SS_LEFTNOWORDWRAP #x0000000C) (define SS_BITMAP #x0000000E) (define SS_ICON #x00000003) @@ -83,7 +84,10 @@ (if (string? label) label "") - (bitwise-ior SS_LEFT WS_CHILD WS_CLIPSIBLINGS + (bitwise-ior (if (string? label) + SS_LEFTNOWORDWRAP + SS_LEFT) + WS_CHILD WS_CLIPSIBLINGS (if bitmap? SS_BITMAP (if (symbol? label) diff --git a/collects/mred/private/wx/win32/window.rkt b/collects/mred/private/wx/win32/window.rkt index ec41976e..ea9e45a5 100644 --- a/collects/mred/private/wx/win32/window.rkt +++ b/collects/mred/private/wx/win32/window.rkt @@ -17,6 +17,7 @@ "theme.rkt" "cursor.rkt" "key.rkt" + "dc.rkt" "font.rkt") (provide @@ -361,7 +362,7 @@ #:scale-h [scale-h 1]) (atomically (unless measure-dc - (let* ([bm (make-object bitmap% 1 1)] + (let* ([bm (make-object win32-bitmap% 1 1 #f)] [dc (make-object bitmap-dc% bm)]) (set! measure-dc dc))) (send measure-dc set-font (or font @@ -383,7 +384,7 @@ (combine-h d1 d1) (combine-h a1 a2)))] [else (send measure-dc get-text-extent label #f #t)]))] - [(->int) (lambda (v) (inexact->exact (floor v)))]) + [(->int) (lambda (v) (inexact->exact (ceiling v)))]) (resize (->int (* scale-h (max (+ w dw) min-w))) (->int (* scale-w (max (+ h dh) min-h)))))))