Fixed MSWClipBoxRegion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
32aae41e68
commit
2f059e30a1
@ -2426,6 +2426,7 @@ typedef void * WXHBRUSH;
|
||||
typedef void * WXHPALETTE;
|
||||
typedef void * WXHCURSOR;
|
||||
typedef void * WXHRGN;
|
||||
typedef void * WXRECTPTR;
|
||||
typedef void * WXHACCEL;
|
||||
typedef void WXFAR * WXHINSTANCE;
|
||||
typedef void * WXHBITMAP;
|
||||
|
@ -49,7 +49,7 @@ protected:
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
virtual WXHRGN MSWCalculateClippingRegion();
|
||||
virtual void MSWClipBoxRegion(HRGN hrgn, const RECT *rc);
|
||||
virtual void MSWClipBoxRegion(WXHRGN hrgn, const WXRECTPTR rc);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticBox)
|
||||
|
@ -199,28 +199,28 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
|
||||
}
|
||||
|
||||
// rc must be in client coords!
|
||||
void wxStaticBox::MSWClipBoxRegion(HRGN hrgn, const RECT *rc)
|
||||
void wxStaticBox::MSWClipBoxRegion(WXHRGN hrgn, const WXRECTPTR rc)
|
||||
{
|
||||
HRGN hrgnchild;
|
||||
|
||||
// top
|
||||
hrgnchild = ::CreateRectRgn(0, 0, rc->right, 14);
|
||||
::CombineRgn(hrgn, hrgn, hrgnchild, RGN_DIFF);
|
||||
hrgnchild = ::CreateRectRgn(0, 0, ((const RECT*) rc)->right, 14);
|
||||
::CombineRgn((HRGN) hrgn, (HRGN) hrgn, hrgnchild, RGN_DIFF);
|
||||
::DeleteObject(hrgnchild);
|
||||
|
||||
// bottom
|
||||
hrgnchild = ::CreateRectRgn(0, rc->bottom - 7, rc->right, rc->bottom);
|
||||
::CombineRgn(hrgn, hrgn, hrgnchild, RGN_DIFF);
|
||||
hrgnchild = ::CreateRectRgn(0, ((const RECT*) rc)->bottom - 7, ((const RECT*) rc)->right, ((const RECT*) rc)->bottom);
|
||||
::CombineRgn((HRGN) hrgn, (HRGN) hrgn, hrgnchild, RGN_DIFF);
|
||||
::DeleteObject(hrgnchild);
|
||||
|
||||
// left
|
||||
hrgnchild = ::CreateRectRgn(0, 0, 7, rc->bottom);
|
||||
::CombineRgn(hrgn, hrgn, hrgnchild, RGN_DIFF);
|
||||
hrgnchild = ::CreateRectRgn(0, 0, 7, ((const RECT*) rc)->bottom);
|
||||
::CombineRgn((HRGN) hrgn, (HRGN) hrgn, hrgnchild, RGN_DIFF);
|
||||
::DeleteObject(hrgnchild);
|
||||
|
||||
// right
|
||||
hrgnchild = ::CreateRectRgn(rc->right - 7, 0, rc->right, rc->bottom);
|
||||
::CombineRgn(hrgn, hrgn, hrgnchild, RGN_DIFF);
|
||||
hrgnchild = ::CreateRectRgn(((const RECT*) rc)->right - 7, 0, ((const RECT*) rc)->right, ((const RECT*) rc)->bottom);
|
||||
::CombineRgn((HRGN) hrgn, (HRGN) hrgn, hrgnchild, RGN_DIFF);
|
||||
::DeleteObject(hrgnchild);
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ void wxStaticBox::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
// paint the inner
|
||||
HRGN hrgn = (HRGN)MSWCalculateClippingRegion();
|
||||
// now remove the box itself
|
||||
MSWClipBoxRegion(hrgn, &rc);
|
||||
MSWClipBoxRegion((WXHRGN) hrgn, (const WXRECTPTR) &rc);
|
||||
|
||||
hbr = DoMSWControlColor(GetHdcOf(dc), wxNullColour);
|
||||
if ( !hbr )
|
||||
|
Loading…
Reference in New Issue
Block a user