- ::WinInvalidateRect(m_hWndScrollBarHorz, &vRectHorz, FALSE);
- ::WinInvalidateRect(m_hWndScrollBarVert, &vRectVert, FALSE);
-
- //
- // Move the children
- //
- wxWindowList::Node* pCurrent = GetChildren().GetFirst();
- SWP vSwp;
-
- while (pCurrent)
- {
- wxWindow* pChildWin = pCurrent->GetData();
-
- if (pChildWin->GetHWND() != NULLHANDLE)
- {
- ::WinQueryWindowPos(pChildWin->GetHWND(), &vSwp);
- ::WinQueryWindowRect(pChildWin->GetHWND(), &vRectChild);
- if (pChildWin->IsKindOf(CLASSINFO(wxControl)))
- {
- wxControl* pCtrl;
-
- //
- // Must deal with controls that have margins like ENTRYFIELD. The SWP
- // struct of such a control will have and origin offset from its intended
- // position by the width of the margins.
- //
- pCtrl = wxDynamicCast(pChildWin, wxControl);
- vSwp.y -= pCtrl->GetYComp();
- vSwp.x -= pCtrl->GetXComp();
- }
- ::WinSetWindowPos( pChildWin->GetHWND()
- ,HWND_BOTTOM
- ,vSwp.x + nDx
- ,vSwp.y + nDy
- ,0
- ,0
- ,SWP_MOVE | SWP_ZORDER
- );
- if (pChildWin->IsKindOf(CLASSINFO(wxRadioBox)))
- {
- wxRadioBox* pRadioBox;
-
- pRadioBox = wxDynamicCast(pChildWin, wxRadioBox);
- pRadioBox->AdjustButtons( (int)vSwp.x + nDx
- ,(int)vSwp.y + nDy
- ,(int)vSwp.cx
- ,(int)vSwp.cy
- ,pRadioBox->GetSizeFlags()
- );
- }
- if (pChildWin->IsKindOf(CLASSINFO(wxSlider)))
- {
- wxSlider* pSlider;
-
- pSlider = wxDynamicCast(pChildWin, wxSlider);
- pSlider->AdjustSubControls( (int)vSwp.x + nDx
- ,(int)vSwp.y + nDy
- ,(int)vSwp.cx
- ,(int)vSwp.cy
- ,pSlider->GetSizeFlags()
- );
- }
- ::WinInvalidateRect(pChildWin->GetHWND(), &vRectChild, FALSE);
- }
- pCurrent = pCurrent->GetNext();
- }