1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| CSize CMyDialogBarResizable::CalcDynamicLayout(int nLength, DWORD dwMode)
{ // Return default if it is being docked or floated
if ((dwMode & LM_VERTDOCK) || (dwMode & LM_HORZDOCK))
{
if (dwMode & LM_STRETCH) // if not docked stretch to fit
return CSize((dwMode & LM_HORZ) ? 32767 : m_sizeDocked.cx,
(dwMode & LM_HORZ) ? m_sizeDocked.cy : 32767);
else
return m_sizeDocked;
}
if (dwMode & LM_MRUWIDTH)
return m_sizeFloating;
// In all other cases, accept the dynamic length
if (dwMode & LM_LENGTHY)
return CSize(m_sizeFloating.cx, (m_bChangeDockedSize) ?
m_sizeFloating.cy = m_sizeDocked.cy = nLength :
m_sizeFloating.cy = nLength);
else
return CSize((m_bChangeDockedSize) ?
m_sizeFloating.cx = m_sizeDocked.cx = nLength :
m_sizeFloating.cx = nLength, m_sizeFloating.cy);
}] |
Partager