X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a76c2f3715f6a1d343f0716f7924db33077843e1..00bb6d6f57537b68de41ddde01388aa55cb6379b:/src/generic/datavgen.cpp diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index cdc30d7bed..a6c94b1e5d 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -1193,6 +1193,13 @@ void wxDataViewHeaderWindowBase::SendEvent(wxEventType type, unsigned int n) #if defined(__WXMSW__) && USE_NATIVE_HEADER_WINDOW +#ifndef HDS_DRAGDROP + #define HDS_DRAGDROP 0x0040 +#endif +#ifndef HDS_FULLDRAG + #define HDS_FULLDRAG 0x0080 +#endif + // implemented in msw/listctrl.cpp: int WXDLLIMPEXP_CORE wxMSWGetColumnClicked(NMHDR *nmhdr, POINT *ptClick); @@ -1205,7 +1212,7 @@ bool wxDataViewHeaderWindowMSW::Create( wxDataViewCtrl *parent, wxWindowID id, m_owner = parent; m_scrollOffsetX = 0; - m_buttonHeight = wxRendererNative::Get().GetHeaderButtonHeight( this ); + m_buttonHeight = wxRendererNative::Get().GetHeaderButtonHeight( this ) + 10; int x = pos.x == wxDefaultCoord ? 0 : pos.x, y = pos.y == wxDefaultCoord ? 0 : pos.y, @@ -1217,7 +1224,7 @@ bool wxDataViewHeaderWindowMSW::Create( wxDataViewCtrl *parent, wxWindowID id, // create the native WC_HEADER window: WXHWND hwndParent = (HWND)parent->GetHandle(); - WXDWORD msStyle = WS_CHILD | HDS_BUTTONS | HDS_HORZ | HDS_HOTTRACK | HDS_FULLDRAG; + WXDWORD msStyle = WS_CHILD | HDS_DRAGDROP | HDS_BUTTONS | HDS_HORZ | HDS_HOTTRACK | HDS_FULLDRAG; if ( m_isShown ) msStyle |= WS_VISIBLE; @@ -1258,13 +1265,6 @@ wxSize wxDataViewHeaderWindowMSW::DoGetBestSize() const return wxSize(80, m_buttonHeight ); } -#ifndef HDF_SORTUP -#define HDF_SORTUP 0x0400 -#endif -#ifndef HDF_SORTDOWN -#define HDF_SORTDOWN 0x0200 -#endif - void wxDataViewHeaderWindowMSW::UpdateDisplay() { // remove old columns @@ -1323,7 +1323,7 @@ void wxDataViewHeaderWindowMSW::UpdateDisplay() default: // such alignment is not allowed for the column header! - wxFAIL; + break; // wxFAIL; } SendMessage((HWND)m_hWnd, HDM_INSERTITEM, @@ -1498,7 +1498,8 @@ bool wxDataViewHeaderWindowMSW::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARA return true; } -void wxDataViewHeaderWindowMSW::ScrollWindow(int dx, int dy, const wxRect *rect ) +void wxDataViewHeaderWindowMSW::ScrollWindow(int dx, int WXUNUSED(dy), + const wxRect * WXUNUSED(rect)) { m_scrollOffsetX += dx; @@ -1510,7 +1511,7 @@ void wxDataViewHeaderWindowMSW::DoSetSize(int x, int y, int f) { // TODO: why is there a border + 2px around it? - wxControl::DoSetSize( x+m_scrollOffsetX-2, y-2, w-m_scrollOffsetX+4, h+4, f ); + wxControl::DoSetSize( x+m_scrollOffsetX+1, y+1, w-m_scrollOffsetX-2, h-2, f ); } #else // !defined(__WXMSW__)