diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index bcc79cd1f7..167de6c152 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -460,15 +460,15 @@ void wxStaticBox::PaintForeground(wxDC& dc, const RECT&) // first we need to correctly paint the background of the label // as Windows ignores the brush offset when doing it - const int x = LABEL_HORZ_OFFSET; + const int x = FromDIP(LABEL_HORZ_OFFSET); RECT dimensions = { x, 0, 0, height }; dimensions.left = x; dimensions.right = x + width; // need to adjust the rectangle to cover all the label background - dimensions.left -= LABEL_HORZ_BORDER; - dimensions.right += LABEL_HORZ_BORDER; - dimensions.bottom += LABEL_VERT_BORDER; + dimensions.left -= FromDIP(LABEL_HORZ_BORDER); + dimensions.right += FromDIP(LABEL_HORZ_BORDER); + dimensions.bottom += FromDIP(LABEL_VERT_BORDER); if ( UseBgCol() ) {