From 3de9fd84fe0d2efc86cd9be49f977170bc898921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Sun, 29 May 2016 17:55:44 +0200 Subject: [PATCH] Fix link errors with older MinGW due to use of GetLayout() This function is not present in older MinGW import libraries, up to at least MinGW 4.8.1, so we can't use it directly as it was done in 22f0801 and we need to load it dynamically. (limited backport from commit d55e4b2829b44a07f7c224f7b3327a1267c27093) --- src/msw/checklst.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index b56e4113c9..591957ab6e 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -159,7 +159,7 @@ bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc, UINT uState = stat & wxOwnerDrawn::wxODSelected ? wxDSB_SELECTED : wxDSB_NORMAL; // checkmarks should not be mirrored in RTL layout - DWORD oldLayout = ::GetLayout(hdc); + DWORD oldLayout = impl->GetLayoutDirection() == wxLayout_RightToLeft ? LAYOUT_RTL : 0; if ( oldLayout & LAYOUT_RTL ) ::SetLayout(hdc, oldLayout | LAYOUT_BITMAPORIENTATIONPRESERVED); wxDrawStateBitmap(hdc, hBmpCheck, x, y, uState);