X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b66a1d31a32e9235792261db6ff755ce26ab5c1..b85b06e13d22e7fc1604ec1a49caa1227a1b3d36:/src/msw/headerctrl.cpp diff --git a/src/msw/headerctrl.cpp b/src/msw/headerctrl.cpp index c4beb2534d..5ed300c44a 100644 --- a/src/msw/headerctrl.cpp +++ b/src/msw/headerctrl.cpp @@ -106,7 +106,9 @@ WXDWORD wxHeaderCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const // the control looks nicer with these styles and there doesn't seem to be // any reason to not use them so we always do (as for HDS_HORZ it is 0 // anyhow but include it for clarity) - msStyle |= HDS_HORZ | HDS_BUTTONS | HDS_FLAT | HDS_FULLDRAG | HDS_HOTTRACK; + // NOTE: don't use however HDS_FLAT because it makes the control look + // non-native when running WinXP in classic mode + msStyle |= HDS_HORZ | HDS_BUTTONS | HDS_FULLDRAG | HDS_HOTTRACK; return msStyle; } @@ -535,7 +537,12 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) if ( idx != wxNOT_FOUND ) { idx = MSWFromNativeIdx(idx); - evtType = GetClickEventType(code == NM_RDBLCLK, 1); + + // due to a bug in mingw32 headers NM_RDBLCLK is signed + // there so we need a cast to avoid warnings about signed/ + // unsigned comparison + evtType = GetClickEventType( + code == static_cast(NM_RDBLCLK), 1); } //else: ignore clicks outside any column }