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)
This commit is contained in:
Václav Slavík
2016-05-29 17:55:44 +02:00
parent 90fa100623
commit 3de9fd84fe

View File

@@ -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);