Bloquer une taille de CView avec OnSize
Bonjour,
Je suis en train de m'arracher les cheveux en essayant de limiter la taille d'une CView dans la méthode OnSize.
Voici la dernière version de ma méthode OnSize
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| void CNavigItemRightView::OnSize(UINT nType, int cx, int cy)
{
if ( !::IsWindow ( m_lst.m_hWnd ) )
return;
if ( cy < m_cpListMin.Width ( ) ) cy = m_cpListMin.Width ( );
if ( cx < m_cpListMin.Height ( ) ) cx = m_cpListMin.Height ( );
CFormView::OnSize(nType, cx, cy);
m_lst .SetWindowPos ( NULL, 0, 30, cx, cy, SWP_NOZORDER );
m_redMessage.SetWindowPos ( NULL, 0, 45, cx, cy, SWP_NOZORDER );
Invalidate();
} |
Mais rien n'y fait.
J'ai essayé le OnMinMaxInfo mais cette méthode ne me convient pas trop.
Comment puis-je faire pour limiter enfin la taille de cette put*** de View ?
Merci d'avance