fixes to static box borders calculations and significant code cleanup (finalizes patch 1166587)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-04-02 01:17:51 +00:00
parent a27cbf44fc
commit 3b6e5fb3f5
4 changed files with 104 additions and 88 deletions

View File

@@ -816,25 +816,21 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
return ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn, hwnd, message, wParam, lParam);
}
WXHRGN wxRadioBox::MSWCalculateClippingRegion()
WXHRGN wxRadioBox::MSWGetRegionWithoutChildren()
{
RECT rc;
::GetWindowRect(GetHwnd(), &rc);
HRGN hrgn = ::CreateRectRgn(rc.left, rc.top, rc.right + 1, rc.bottom + 1);
size_t count = GetCount();
const size_t count = GetCount();
for ( size_t i = 0; i < count; ++i )
{
::GetWindowRect((*m_radioButtons)[i], &rc);
HRGN hrgnchild = ::CreateRectRgnIndirect(&rc);
AutoHRGN hrgnchild(::CreateRectRgnIndirect(&rc));
::CombineRgn(hrgn, hrgn, hrgnchild, RGN_DIFF);
::DeleteObject(hrgnchild);
}
::GetWindowRect(GetHwnd(), &rc);
::OffsetRgn(hrgn, -rc.left, -rc.top);
return hrgn;
return (WXHRGN)hrgn;
}
WXLRESULT wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)