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
22f0801378
and we need to load it dynamically.
This was already done in wxDC code, so just reuse the same wrapper function
after extracting it (and a few others, for consistency) into a new header.
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "wx/renderer.h"
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/msw/dc.h"
|
||||
#include "wx/msw/private/dcdynwrap.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private functions
|
||||
@@ -159,7 +160,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 = wxDynLoadWrappers::GetLayout(hdc);
|
||||
if ( oldLayout & LAYOUT_RTL )
|
||||
::SetLayout(hdc, oldLayout | LAYOUT_BITMAPORIENTATIONPRESERVED);
|
||||
wxDrawStateBitmap(hdc, hBmpCheck, x, y, uState);
|
||||
|
Reference in New Issue
Block a user