Originally posted by: Michael Schikora
Hi Stephan,
this makes my class obsolete :)
Here 's a little fix for the correct scaling:
..Init(..) :
// ::GetWindowRect(m_hParent, m_origParentSize);
should be replaced by:
::GetClientRect(m_hParent, m_origParentSize);
::ClientToScreen(m_hParent, &m_origParentSize.TopLeft());
::ClientToScreen(m_hParent, &m_origParentSize.BottomRight());
..OnSize(..) :
// ::GetWindowRect(m_hParent, currParentSize);
should be replaced by:
::GetClientRect(m_hParent, currParentSize);
::ClientToScreen(m_hParent, &currParentSize.TopLeft());
::ClientToScreen(m_hParent, &currParentSize.BottomRight());
This is a fix for a better background
..OnSize() :
// resize child window ,moving without drawing !
::MoveWindow(it->m_hCtrl, currCtrlSize.left, currCtrlSize.top, currCtrlSize.Width(), currCtrlSize.Height(), FALSE);
//drawing at the end of OnSize()
::InvalidateRect(m_hParent,NULL,TRUE);
::UpdateWindow(m_hParent);
}
Tsch�s Schiko