Don't hide wrong border around header button control just to show the problem

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-10-24 08:14:49 +00:00
parent a74450b48f
commit 0677c6cb66

View File

@@ -1205,7 +1205,7 @@ bool wxDataViewHeaderWindowMSW::Create( wxDataViewCtrl *parent, wxWindowID id,
m_owner = parent; m_owner = parent;
m_scrollOffsetX = 0; m_scrollOffsetX = 0;
m_buttonHeight = wxRendererNative::Get().GetHeaderButtonHeight( this ); m_buttonHeight = wxRendererNative::Get().GetHeaderButtonHeight( this ) + 10;
int x = pos.x == wxDefaultCoord ? 0 : pos.x, int x = pos.x == wxDefaultCoord ? 0 : pos.x,
y = pos.y == wxDefaultCoord ? 0 : pos.y, y = pos.y == wxDefaultCoord ? 0 : pos.y,
@@ -1217,7 +1217,7 @@ bool wxDataViewHeaderWindowMSW::Create( wxDataViewCtrl *parent, wxWindowID id,
// create the native WC_HEADER window: // create the native WC_HEADER window:
WXHWND hwndParent = (HWND)parent->GetHandle(); 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 ) if ( m_isShown )
msStyle |= WS_VISIBLE; msStyle |= WS_VISIBLE;
@@ -1258,13 +1258,6 @@ wxSize wxDataViewHeaderWindowMSW::DoGetBestSize() const
return wxSize(80, m_buttonHeight ); return wxSize(80, m_buttonHeight );
} }
#ifndef HDF_SORTUP
#define HDF_SORTUP 0x0400
#endif
#ifndef HDF_SORTDOWN
#define HDF_SORTDOWN 0x0200
#endif
void wxDataViewHeaderWindowMSW::UpdateDisplay() void wxDataViewHeaderWindowMSW::UpdateDisplay()
{ {
// remove old columns // remove old columns
@@ -1323,7 +1316,7 @@ void wxDataViewHeaderWindowMSW::UpdateDisplay()
default: default:
// such alignment is not allowed for the column header! // such alignment is not allowed for the column header!
wxFAIL; break; // wxFAIL;
} }
SendMessage((HWND)m_hWnd, HDM_INSERTITEM, SendMessage((HWND)m_hWnd, HDM_INSERTITEM,
@@ -1511,7 +1504,7 @@ void wxDataViewHeaderWindowMSW::DoSetSize(int x, int y,
int f) int f)
{ {
// TODO: why is there a border + 2px around it? // 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__) #else // !defined(__WXMSW__)